module share.protocol;

import std.datetime;

const DEFBLOCKSIZE = 16;

const MAXBAGITEM = 46;
const MAXUSEITEM = 14;
const MAXHORSEBAG = 30;
const MAXUSERMAGIC = 25; // (sonmg 2004/10/27)
const MAXSAVEITEM = 100;

const MAXQUESTINDEXBYTE = 24;
const MAXQUESTBYTE = 176;


// Å¬¶óÀÌ¾ðÆ®¿¡¼­ ¾²ÀÓ
const LOGICALMAPUNIT = 40;
const UNITX = 48;
const UNITY = 32;
const HALFX = 24;
const HALFY = 16;

const OS_MOVINGOBJECT = 1;
const OS_ITEMOBJECT = 2;
const OS_EVENTOBJECT = 3;
const OS_GATEOBJECT = 4;
const OS_SWITCHOBJECT = 5;
const OS_MAPEVENT = 6;
const OS_DOOR = 7;
const OS_ROON = 8;

// StatusArr Size ÁöÁ¤(sonmg 2004/03/19)
const STATUSARR_SIZE = 16;
const EXTRAABIL_SIZE = 7;
// 2003/07/15 »óÅÂÀÌ»ó Ãß°¡
const POISON_DECHEALTH = 0; //$80000000
const POISON_DAMAGEARMOR = 1; //$40000000
const POISON_ICE = 2; //$20000000
const POISON_STUN = 3; //$10000000
const POISON_SLOW = 4; //$08000000
const POISON_STONE = 5; //$04000000
const POISON_DONTMOVE = 6; //$02000000

const STATE_BLUECHAR = 2;
const STATE_FASTMOVE = 7; //$01000000
const STATE_TRANSPARENT = 8; //$00800000
const STATE_DEFENCEUP = 9; //$00400000
const STATE_MAGDEFENCEUP = 10; //$00200000
const STATE_BUBBLEDEFENCEUP = 11; //$00100000

// 2004/03/19 Ä³¸¯ÅÍ È¿°ú Ãß°¡(sonmg)
const STATE_50LEVELEFFECT = 12; //$00080000
const STATE_TEMPORARY1 = 13; //$00040000  //ÀÓ½Ã1(»©»©·ÎÀÌÆåÆ®)
const STATE_TEMPORARY2 = 14; //$00020000  //ÀÓ½Ã2(È£¹Ú¸Ó¸®)
const STATE_TEMPORARY3 = 15; //$00010000  //ÀÓ½Ã3(ÇÏÆ®»©»©·Î)

const EABIL_DCUP = 0; //¼ø°£ÀûÀ¸·Î ÆÄ±«·ÂÀ» ¿Ã¸² (ÀÏÁ¤ ½Ã°£)
const EABIL_MCUP = 1;
const EABIL_SCUP = 2;
const EABIL_HITSPEEDUP = 3;
const EABIL_HPUP = 4;
const EABIL_MPUP = 5;
const EABIL_PWRRATE = 6; // °ø°Ý·Â ·¹ÀÌÆ® Á¶Á¤

// ItemDesc ÀÇ ¼Ó¼º
const IDC_UNIDENTIFIED = 0x01; //´É·Â È®ÀÎ ¾ÈµÊ
const IDC_UNABLETAKEOFF = 0x02; //¼Õ¿¡¼­ ¶³¾îÁöÁö ¾ÊÀ½, ¹ÌÁö¼ö »ç¿ëÀ¸·Î ¶³¾îÁü
const IDC_NEVERTAKEOFF = 0x04; //¼Õ¿¡¼­ Àý´ë·Î ¶³¾îÁöÁö ¾ÊÀ½
const IDC_DIEANDBREAK = 0x08; //Á×À¸¸é ±úÁü
const IDC_NEVERLOSE = 0x10; //Á×¾îµµ ÀÒ¾î¹ö¸®Áö ¾ÊÀ½


const STATE_STONE_MODE = 0x00000001; //¼®»ó¸ó½ºÅÍÀÇ ¸ð½À(¼®»óÀ¸·Î ÀÖÀ½)
const STATE_OPENHEATH = 0x00000002; //Ã¼·Â °ø°³»óÅÂ


const HAM_ALL = 0; //¸ðµÎ °ø°Ý
const HAM_PEACE = 1; //ÆòÈ­¸ðµå, ¸ó½ºÅÍ¸¸ °ø°Ý
const HAM_GROUP = 2; //±×·ì¿ø ÀÌ¿Ü ¾Æ¹«³ª °ø°Ý
const HAM_GUILD = 3; //±æµå¿ø ÀÌ¿Ü ¾Æ¹«³ª °ø°Ý
const HAM_PKATTACK = 4; //»¡°»ÀÌ ´ë ÈòµÕÀÌ
const HAM_GUILDWAR = 5; //Àû´ë¹®ÆÄ¸¸ °ø°Ý

const HAM_MAXCOUNT = 6;


const AREA_FIGHT = 0x01;
const AREA_SAFE = 0x02;
const AREA_FREEPK = 0x04;


const HM_HIT = 0;
const HM_HEAVYHIT = 1;
const HM_BIGHIT = 2;
const HM_POWERHIT = 3;
const HM_LONGHIT = 4;
const HM_WIDEHIT = 5;
// 2003/03/15 ½Å±Ô¹«°ø
const HM_CROSSHIT = 6; //4 °÷ ¸ÂÀ½ -> 8°÷ ¸ÂÀ½
const HM_FIREHIT = 7;
const HM_TWINHIT = 8; //2¹ø °ø°Ý
const HM_STONEHIT = 9; //4 °÷ ¸ÂÀ½ -> 8°÷ ¸ÂÀ½

//----------------------------

// SM_??    ¼­¹ö -> Å¬¶óÀÌ¾ðÆ®·Î
//  1 ~ 2000
const SM_TEST = 1;
// Èå¸§Á¦¾î ¸í·É
const SM_STOPACTIONS = 2; //¸ðµç Ä³¸¯ÅÍ/¸¶¹ýÀÇ µ¿ÀÛÀ» ¸ØÃá´Ù.
// ´Ù¸¥ ¸Ê¿¡ µé¾î°£ °æ¿ì,

// Çàµ¿¿¡ °ü·Ã ¸í·É
const SM_ACTION_MIN = 5;
const SM_THROW = 5;
const SM_RUSH = 6; //¾ÕÀ¸·Î ÀüÁø
const SM_RUSHKUNG = 7; //¾ÕÀ¸·Î ÀüÁø½ÇÆÐ
const SM_FIREHIT = 8; //¿°È­°á
const SM_BACKSTEP = 9; //µÞ°ÉÀ½Áú,
const SM_TURN = 10;
const SM_WALK = 11;
const SM_SITDOWN = 12;
const SM_RUN = 13;
const SM_HIT = 14;
const SM_HEAVYHIT = 15;
const SM_BIGHIT = 16;
const SM_SPELL = 17;
const SM_POWERHIT = 18;
const SM_LONGHIT = 19; //´õ ¼¼°Ô ¶§¸²
const SM_DIGUP = 20; //¶¥ÆÄ°í ³ª¿À´Ù.
const SM_DIGDOWN = 21; //¶¥ÆÄ°í µé¾î°¡ ¼û´Ù.
const SM_FLYAXE = 22;
const SM_LIGHTING = 23; //¸¶¹ý »ç¿ë
const SM_WIDEHIT = 24;
const SM_ACTION_MAX = 25;

// 2003/03/15 ½Å±Ô¹«°ø
const SM_CROSSHIT = 35; //±¤Ç³Âü, ÁÖº¯8Å¸ÀÏ °ø°Ý
const SM_TWINHIT = 36; //½Ö·æÂü, ºü¸£°Ô 2¹ø °ø°Ý
const SM_STONEHIT = 37; //»çÀÚÈÄ, ÁÖº¯8Å¸ÀÏ µ¹·Î¸¸µë
const SM_WINDCUT = 38; //°øÆÄ¼¶,  ¾ÕÅ¸ÀÏ 9°³ °ø°Ý
const SM_DRAGONFIRE = 39; // Ãµ·æ±â¿°(È­·æ±â¿°)  ÀÚ½ÅÁÖº¯ Å¸ÀÏ 25°³ °ø°Ý
const SM_CURSE = 40; // ÀúÁÖ¼ú
// 2004/06/22 ½Å±Ô¹«°ø(Æ÷½Â°Ë, ÈíÇ÷¼ú, ¸Í¾È¼ú)
const SM_PULLMON = 41; //Æ÷½Â°Ë, ²ø¾î´ç±è
const SM_SUCKBLOOD = 42; //ÈíÇ÷¼ú, ÇÇ¸¦ »¡¾ÆµéÀÓ
const SM_BLINDMON = 43; //¸Í¾È¼ú, ÀûÀÇ ½Ã¾ß¸¦ °¡¸²

// FireDragon ------------------------ by Leekg...2003/11/27
const MAGIC_DUN_THUNDER = 70; //¿ë´øÁ¯ ¹ø°³  // FireDragon
const MAGIC_DUN_FIRE1 = 71; //¿ë´øÁ¯ ¿ë¾Ï µ¢¾î¸®
const MAGIC_DUN_FIRE2 = 72; //¿ë´øÁ¯ ¿ë¾Ï ÀÓÆåÆ®
const MAGIC_DRAGONFIRE = 73; //¿ëºÒ°ø°Ý ÅÍÁü
const MAGIC_FIREBURN = 74; //¿ë¼®»ó°ø°Ý ÅÍÁü Å¸¿À¸§

const MAGIC_SERPENT_1 = 75; //ÀÌ¹«±â ¸êÃµÈ­
const MAGIC_JW_EFFECT1 = 76; //Àå¿ø ÀÓÆåÆ® 1
const MAGIC_FOX_THUNDER = 78; //¼ú»çºñ¿ù¿©¿ì °­°Ý
const MAGIC_FOX_FIRE1 = 79; //¼ú»çºñ¿ù¿©¿ì È­¿°

const SM_DRAGON_LIGHTING = 80;
const SM_DRAGON_FIRE1 = 81;
const SM_DRAGON_FIRE2 = 82;
const SM_DRAGON_FIRE3 = 83;

const SM_DRAGON_STRUCK = 85;
const SM_DRAGON_DROPITEM = 86;
const SM_LIGHTING_1 = 87; //¸¶¹ý_1:ÀÌ¹«±â ¸êÃµÈ­
const SM_LIGHTING_2 = 88;
const SM_LIGHTING_3 = 89; //Çö¹«Çö½Å

const MAGIC_FOX_FIRE2 = 90; //µµ»çºñ¿ù¿©¿ì Æø»ì°è
const MAGIC_FOX_CURSE = 91; //µµ»çºñ¿ù¿©¿ì ÀúÁÖ¼ú
const MAGIC_SOULBALL_ATT1 = 93; //ºñ¿ùÃµÁÖ Àü±â °ø°Ý(±ÙÁ¢¹üÀ§)
const MAGIC_SOULBALL_ATT2 = 94; //ºñ¿ùÃµÁÖ Àü±â °ø°Ý(¿ø°Å¸®)
const MAGIC_SOULBALL_ATT3_1 = 95; //ºñ¿ùÃµÁÖ Àü±â °ø°Ý(ÇÊ»ç±â) 5°¡Áö ÀÓÆåÆ®
const MAGIC_SOULBALL_ATT3_2 = 96;
const MAGIC_SOULBALL_ATT3_3 = 97;
const MAGIC_SOULBALL_ATT3_4 = 98;
const MAGIC_SOULBALL_ATT3_5 = 99;
const MAGIC_SIDESTONE_ATT1 = 100; //È£È¥±â¼® Àü±â °ø°Ý
const MAGIC_TURTLE_WARTERATT = 101; //°©Ã¶±Í¼ö ¹°°ø°Ý

const MAGIC_KINGTURTLE_ATT1 = 102; //Çö¹«Çö½Å-Èú¸µ
const MAGIC_KINGTURTLE_ATT2_1 = 103; //Çö¹«Çö½Å-ÀüÃ¼¹°°ø°Ý1
const MAGIC_KINGTURTLE_ATT2_2 = 104; //Çö¹«Çö½Å-ÀüÃ¼¹°°ø°Ý2
const MAGIC_KINGTURTLE_ATT3 = 105; //Çö¹«Çö½Å-¸ó½ºÅÍ¼ÒÈ¯

const SM_ACTION2_MIN = 1000;
//const SM_READYFIREHIT = 1000;  //Å¬¶óÀÌ¾ðÆ®¿¡¼­¸¸ ¾²ÀÓ, ¿°È­°á ÁØºñ

const SM_ACTION2_MAX = 1099;

const SM_DIE = 26; //»ç¶ó Áü
const SM_ALIVE = 27;
const SM_MOVEFAIL = 28;
const SM_HIDE = 29;
const SM_DISAPPEAR = 30;
const SM_STRUCK = 31;
const SM_DEATH = 32;
const SM_SKELETON = 33;
const SM_NOWDEATH = 34;

const SM_HEAR = 40;
const SM_FEATURECHANGED = 41;
const SM_USERNAME = 42;
const SM_WINEXP = 44;
const SM_LEVELUP = 45;
const SM_DAYCHANGING = 46;

const SM_LOGON = 50;
const SM_NEWMAP = 51;
const SM_ABILITY = 52;
const SM_HEALTHSPELLCHANGED = 53;
const SM_MAPDESCRIPTION = 54;

const SM_CHANGEFAMEPOINT = 55; //¸í¼ºÄ¡ º¯È­(2004/11/04)

const SM_SYSMESSAGE = 100;
const SM_GROUPMESSAGE = 101;
const SM_CRY = 102;
const SM_WHISPER = 103;
const SM_GUILDMESSAGE = 104;
const SM_SYSMSG_REMARK = 105;

// ITEM ?
const SM_ADDITEM = 200; //¾ÆÀÌÅÛÀ» »õ·Î ¾òÀ½  Series(¼ö·®)
const SM_BAGITEMS = 201; //°¡¹æÀÇ ¸ðµç ¾ÆÀÌÅÛ
const SM_DELITEM = 202; //´â¾Æ¼­ ¾ø¾îÁö´Â µîÀÇ ÀÌÀ¯·Î ¾ø¾îÁü
const SM_UPDATEITEM = 203; //¾ÆÀÌÅÛÀÇ »ç¾çÀÌ º¯ÇÔ
// Magic
const SM_ADDMAGIC = 210;
const SM_SENDMYMAGIC = 211; //
const SM_DELMAGIC = 212;

const SM_VERSION_AVAILABLE = 500;
const SM_VERSION_FAIL = 501;
const SM_PASSWD_SUCCESS = 502;
const SM_PASSWD_FAIL = 503;
const SM_NEWID_SUCCESS = 504; //»õ¾ÆÀÌµð Àß ¸¸µé¾î Á³À½
const SM_NEWID_FAIL = 505; //»õ¾ÆÀÌµð ¸¸µé±â ½ÇÆÐ
const SM_CHGPASSWD_SUCCESS = 506;
const SM_CHGPASSWD_FAIL = 507;
const SM_QUERYCHR = 520; //Ä³¸¯¸®½ºÆ®
const SM_NEWCHR_SUCCESS = 521;
const SM_NEWCHR_FAIL = 522;
const SM_DELCHR_SUCCESS = 523;
const SM_DELCHR_FAIL = 524;
const SM_STARTPLAY = 525;
const SM_STARTFAIL = 526;
const SM_QUERYCHR_FAIL = 527;
const SM_OUTOFCONNECTION = 528; //¿¬°á ÇØÁ¦µÊ
const SM_PASSOK_SELECTSERVER = 529;
const SM_SELECTSERVER_OK = 530;
const SM_NEEDUPDATE_ACCOUNT = 531; //°èÁ¤ÀÇ Á¤º¸¸¦ ´Ù½Ã ÀÔ·ÂÇÏ±â ¹Ù¶÷ Ã¢..
const SM_UPDATEID_SUCCESS = 532;
const SM_UPDATEID_FAIL = 533;
const SM_PASSOK_WRONGSSN = 534;
const SM_NOT_IN_SERVICE = 535;
const SM_SEND_PUBLICKEY = 536;
const SM_FOXSTATE = 537; //ºñ¿ùÃµÁÖ »óÅÂ


const SM_DROPITEM_SUCCESS = 600; //¾ÆÀÌÅÛ ¹ö¸®±â ¼º°ø
const SM_DROPITEM_FAIL = 601; //
const SM_ITEMSHOW = 610;
const SM_ITEMHIDE = 611;
const SM_OPENDOOR_OK = 612;
const SM_OPENDOOR_LOCK = 613;
const SM_CLOSEDOOR = 614;
const SM_TAKEON_OK = 615; //Âø¿ë ¼º°ø, + New Feature
const SM_TAKEON_FAIL = 616; //Âø¿ë ½ÇÆÐ
const SM_EXCHGTAKEON_OK = 617; //Âø¿ë¾ÆÀÌÅÛ ±³È¯ ¼º°ø
const SM_EXCHGTAKEON_FAIL = 618; //Âø¿ë¾ÆÀÌÅÛ ±³È¯ ½ÇÆÐ
const SM_TAKEOFF_OK = 619; //¹þ±â ¼º°ø, + New Feature
const SM_TAKEOFF_FAIL = 620; //
const SM_SENDUSEITEMS = 621; //Âø¿ë ¾ÆÀÌÅÛ ¸ðµÎ º¸³¿
const SM_WEIGHTCHANGED = 622;
const SM_CLEAROBJECTS = 633;
const SM_CHANGEMAP = 634;
const SM_EAT_OK = 635;
const SM_EAT_FAIL = 636;
const SM_BUTCH = 637;
const SM_MAGICFIRE = 638; //¸¶¹ý ¹ß»çµÊ  CM_SPELL -> SM_SPELL + SM_MAGICFIRE
const SM_MAGICFIRE_FAIL = 639;
const SM_MAGIC_LVEXP = 640;
const SM_SOUND = 641;
const SM_DURACHANGE = 642;
const SM_MERCHANTSAY = 643;
const SM_MERCHANTDLGCLOSE = 644;
const SM_SENDGOODSLIST = 645;
const SM_SENDUSERSELL = 646;
const SM_SENDBUYPRICE = 647;
const SM_USERSELLITEM_OK = 648;
const SM_USERSELLITEM_FAIL = 649;
const SM_BUYITEM_SUCCESS = 650;
const SM_BUYITEM_FAIL = 651;
const SM_SENDDETAILGOODSLIST = 652;
const SM_GOLDCHANGED = 653;
const SM_CHANGELIGHT = 654;
const SM_LAMPCHANGEDURA = 655;
const SM_CHANGENAMECOLOR = 656;
const SM_CHARSTATUSCHANGED = 657;
const SM_SENDNOTICE = 658;
const SM_GROUPMODECHANGED = 659;
const SM_CREATEGROUP_OK = 660;
const SM_CREATEGROUP_FAIL = 661;
const SM_GROUPADDMEM_OK = 662;
const SM_GROUPDELMEM_OK = 663;
const SM_GROUPADDMEM_FAIL = 664;
const SM_GROUPDELMEM_FAIL = 665;
const SM_GROUPCANCEL = 666;
const SM_GROUPMEMBERS = 667;
const SM_SENDUSERREPAIR = 668;
const SM_USERREPAIRITEM_OK = 669;
const SM_USERREPAIRITEM_FAIL = 670;
const SM_SENDREPAIRCOST = 671;
const SM_DEALMENU = 673;
const SM_DEALTRY_FAIL = 674;
const SM_DEALADDITEM_OK = 675;
const SM_DEALADDITEM_FAIL = 676;
const SM_DEALDELITEM_OK = 677;
const SM_DEALDELITEM_FAIL = 678;
//const SM_DEALREMOTEADDITEM_OK = 679;
//const SM_DEALREMOTEDELITEM_OK = 680;
const SM_DEALCANCEL = 681; //µµÁß¿¡ °Å·¡ Ãë¼ÒµÊ
const SM_DEALREMOTEADDITEM = 682; //»ó´ë¹æÀÌ ±³È¯ ¾ÆÀÌÅÛÀ» Ãß°¡
const SM_DEALREMOTEDELITEM = 683; //»ó´ë¹æÀÌ ±³È¯ ¾ÆÀÌÅÛÀ» »­
const SM_DEALCHGGOLD_OK = 684;
const SM_DEALCHGGOLD_FAIL = 685;
const SM_DEALREMOTECHGGOLD = 686;
const SM_DEALSUCCESS = 687;
const SM_SENDUSERSTORAGEITEM = 700;
const SM_STORAGE_OK = 701;
const SM_STORAGE_FULL = 702; //´õ º¸°ü ¸ø ÇÔ.
const SM_STORAGE_FAIL = 703; //º¸°ü ¿¡·¯
const SM_SAVEITEMLIST = 704;
const SM_TAKEBACKSTORAGEITEM_OK = 705;
const SM_TAKEBACKSTORAGEITEM_FAIL = 706;
const SM_TAKEBACKSTORAGEITEM_FULLBAG = 707;
const SM_AREASTATE = 708; //¾ÈÀü,´ë·Ã,ÀÏ¹Ý..
const SM_DELITEMS = 709;
const SM_READMINIMAP_OK = 710;
const SM_READMINIMAP_FAIL = 711;
const SM_SENDUSERMAKEDRUGITEMLIST = 712;
const SM_MAKEDRUG_SUCCESS = 713;
const SM_MAKEDRUG_FAIL = 714;
const SM_ALLOWPOWERHIT = 715;
const SM_NORMALEFFECT = 716; //±âº» È¿°ú
// ¾ÆÀÌÅÛ Á¦Á¶
const SM_SENDUSERMAKEITEMLIST = 717;

const SM_CHANGEGUILDNAME = 750; //±æµåÀÇ ÀÌ¸§ È¤ÀÇ ±æµå³»ÀÇ Á÷Ã¥ÀÌ¸§ÀÌ º¯°æ
const SM_SENDUSERSTATE = 751; //
const SM_SUBABILITY = 752;
const SM_OPENGUILDDLG = 753;
const SM_OPENGUILDDLG_FAIL = 754;
const SM_SENDGUILDHOME = 755;
const SM_SENDGUILDMEMBERLIST = 756;
const SM_GUILDADDMEMBER_OK = 757;
const SM_GUILDADDMEMBER_FAIL = 758;
const SM_GUILDDELMEMBER_OK = 759;
const SM_GUILDDELMEMBER_FAIL = 760;
const SM_GUILDRANKUPDATE_FAIL = 761;
const SM_BUILDGUILD_OK = 762;
const SM_BUILDGUILD_FAIL = 763;
const SM_DONATE_FAIL = 764;
const SM_DONATE_OK = 765;
const SM_MYSTATUS = 766;
const SM_MENU_OK = 767; //descriptionÀ¸·Î ¸Þ¼¼Áö Àü´Þ
const SM_GUILDMAKEALLY_OK = 768;
const SM_GUILDMAKEALLY_FAIL = 769;
const SM_GUILDBREAKALLY_OK = 770;
const SM_GUILDBREAKALLY_FAIL = 771;
const SM_DLGMSG = 772;

const SM_SPACEMOVE_HIDE = 800; //¼ø°£ÀÌµ¿ »ç¶óÁü
const SM_SPACEMOVE_SHOW = 801; //³ªÅ¸³²
const SM_RECONNECT = 802;
const SM_GHOST = 803; //È­¸é¿¡ ³ªÅ¸³­ ÀÜ»óÀÓ
const SM_SHOWEVENT = 804;
const SM_HIDEEVENT = 805;
const SM_SPACEMOVE_HIDE2 = 806; //¼ø°£ÀÌµ¿ »ç¶óÁü
const SM_SPACEMOVE_SHOW2 = 807; //³ªÅ¸³²
const SM_SPACEMOVE_SHOW_NO = 808; //³ªÅ¸³²(ÀÌÆåÆ® ¾øÀ½)

const SM_TIMECHECK_MSG = 810; //Å¬¶óÀÌ¾ðÆ®¿¡¼­ ½Ã°£
const SM_ADJUST_BONUS = 811; //º¸³Ê½º Æ÷ÀÎÆ®¸¦ Á¶Á¤ÇÏ¶ó.
// Frined System -------------
const SM_FRIEND_DELETE = 812; //Ä£±¸ »èÁ¦
const SM_FRIEND_INFO = 813; //Ä£±¸ Ãß°¡ ¹× Á¤º¸º¯°æ
const SM_FRIEND_RESULT = 814; //Ä£±¸°ü·Ã °á°ú°ª Àü¼Û
// Tag System ----------------
const SM_TAG_ALARM = 815; //ÂÊÁö¿ÔÀ½ ¾Ë¸²
const SM_TAG_LIST = 816; //ÂÊÁö¸®½ºÆ®
const SM_TAG_INFO = 817; //ÂÊÁöÁ¤º¸ º¯°æ
const SM_TAG_REJECT_LIST = 818; //°ÅºÎÀÚ ¸®½ºÆ®
const SM_TAG_REJECT_ADD = 819; //°ÅºÎÀÚ Ãß°¡
const SM_TAG_REJECT_DELETE = 820; //°ÅºÎÀÚ »èÁ¦
const SM_TAG_RESULT = 821; //ÂÊÁö°ü·Ã °á°ú°ª Àü¼Û
// User System ---------------
const SM_USER_INFO = 822; //À¯ÀúÀÇ Á¢¼Ó»óÅÂ¹× ¸ÊÁ¤º¸Àü¼Û
// RelationShip --------------
const SM_LM_LIST = 823; //°ü°è ¸®½ºÆ®
const SM_LM_OPTION = 824; //°ü°è ¿É¼Ç
const SM_LM_REQUEST = 825; //°ü°è ¼³Á¤ ¿ä±¸
const SM_LM_DELETE = 826; //°ü°è »èÁ¦
const SM_LM_RESULT = 827; //°ü°è °á°ú°ª Àü¼Û
// À§Å¹ÆÇ¸Å ---------------------
const SM_MARKET_LIST = 828; // À§Å¹¸®½ºÆ®Àü¼Û
const SM_MARKET_RESULT = 829; // À§Å¹°á°ú  Àü¼Û

// ¹®ÆÄÀå¿ø ---------------------
const SM_GUILDAGITLIST = 830; //Àå¿ø ÆÇ¸Å ¸ñ·Ï
const SM_GUILDAGITDEALMENU = 831; //Àå¿ø°Å·¡

// Àå¿ø°Ô½ÃÆÇ
const SM_GABOARD_LIST = 832; // Àå¿ø°Ô½ÃÆÇ ¸®½ºÆ®
const SM_GABOARD_READ = 833; // Àå¿ø°Ô½ÃÆÇ ±ÛÀÐ±â
const SM_GABOARD_NOTICE_OK = 834; // Àå¿ø°Ô½ÃÆÇ °øÁö»çÇ× ¾²±â OK
const SM_GABOARD_NOTICE_FAIL = 835; // Àå¿ø°Ô½ÃÆÇ °øÁö»çÇ× ¾²±â FAIL

// Àå¿ø²Ù¹Ì±â
const SM_DECOITEM_LIST = 836; // Àå¿ø²Ù¹Ì±â ¾ÆÀÌÅÛ ¸®½ºÆ®
const SM_DECOITEM_LISTSHOW = 837; // Àå¿ø²Ù¹Ì±â ¾ÆÀÌÅÛ ¸®½ºÆ®

// ±×·ì °á¼º È®ÀÎ
const SM_CREATEGROUPREQ = 838; //±×·ì °á¼º È®ÀÎ
const SM_ADDGROUPMEMBERREQ = 839; //±×·ì °á¼º È®ÀÎ
// RelationShip (cont.)--------------
const SM_LM_DELETE_REQ = 840; //°ü°è »èÁ¦ È®ÀÎ

//1000 ~ 1099  ¾×¼ÇÀ¸·Î ¿¹¾à

const SM_OPENHEALTH = 1100; //Ã¼·ÂÀÌ »ó´ë¹æ¿¡ º¸ÀÓ
const SM_CLOSEHEALTH = 1101; //Ã¼·ÂÀÌ »ó´ë¹æ¿¡°Ô º¸ÀÌÁö ¾ÊÀ½
const SM_BREAKWEAPON = 1102;
const SM_INSTANCEHEALGUAGE = 1103;
const SM_CHANGEFACE = 1104; //º¯½Å...
const SM_NEXTTIME_PASSWORD = 1105; //´ÙÀ½¹ø¿¡´Â ºñ¹Ð¹øÈ£ ÀÔ·Â ¸ðµåÀÌ´Ù.
const SM_CHECK_CLIENTVALID = 1106; //Å¬¶óÀÌ¾ðÆ®ÀÇ ¼öÁ¤ ¿©ºÎ È®ÀÎ

const SM_LOOPNORMALEFFECT = 1107; //·çÇÁ ÀÓÆåÆ® È¿°ú
const SM_LOOPSCREENEFFECT = 1108; //È­¸é ÀÌÆåÆ®

const SM_PLAYDICE = 1200;
const SM_PLAYROCK = 1201;
// 2003/02/11 ±×·ì¿ø À§Ä¡ Á¤º¸
const SM_GROUPPOS = 1312;

// UpgradeItem_Result ---------------- by sonmg...2003/10/02
const SM_UPGRADEITEM_RESULT = 1300;
// °ãÄ¡±â
const SM_COUNTERITEMCHANGE = 1301;
const SM_USERSELLCOUNTITEM_OK = 1302;
const SM_USERSELLCOUNTITEM_FAIL = 1303;

const SM_CANCLOSE_OK = 1304;
const SM_CANCLOSE_FAIL = 1305;


//CM_??   Å¬¶óÀÌ¾ðÆ® -> ¼­¹ö·Î
//  2000 ~ 4000
const CM_PROTOCOL = 2000;
const CM_IDPASSWORD = 2001;
const CM_ADDNEWUSER = 2002;
const CM_CHANGEPASSWORD = 2003;
const CM_UPDATEUSER = 2004;

//----------------------------

const CM_QUERYCHR = 100;
const CM_NEWCHR = 101;
const CM_DELCHR = 102;
const CM_SELCHR = 103;
const CM_SELECTSERVER = 104; //¼­¹ö¸¦ ¼±ÅÃ (+ ¼­¹öÀÌ¸§)

//3000 - 3099 Å¬¶óÀÌ¾ðÆ® ÀÌµ¿ ¸Þ¼¼Áöµµ ¿¹¾à
//¼­¹ö¿¡¼­ ÀÌµ¿ ¸Þ¼¼Áöµµ 0..99 »çÀÌ ÀÌ¾î¾ß ÇÑ´Ù.
const CM_THROW = 3005;
const CM_TURN = 3010; //CM_TURN - 3000 = SM_TURN ±ÔÄ¢À» ¹Ýµå½Ã ÁöÄÑ¾ß ÇÔ
const CM_WALK = 3011;
const CM_SITDOWN = 3012;
const CM_RUN = 3013;
const CM_HIT = 3014;
const CM_HEAVYHIT = 3015;
const CM_BIGHIT = 3016;
const CM_SPELL = 3017;
const CM_POWERHIT = 3018; //´õ ¼¼°Ô ¶§¸²
const CM_LONGHIT = 3019; //´õ ¼¼°Ô ¶§¸²
const CM_WIDEHIT = 3024;
const CM_FIREHIT = 3025;
const CM_SAY = 3030;
// 2003/03/15 ½Å±Ô¹«°ø
const CM_CROSSHIT = 3035;
const CM_TWINHIT = 3036;

const CM_QUERYUSERNAME = 80; //QUERY ½Ã¸®Áî ¸í·É¾î
const CM_QUERYBAGITEMS = 81;
const CM_QUERYUSERSTATE = 82; //Å¸ÀÎÀÇ »óÅÂ º¸±â

const CM_DROPITEM = 1000;
const CM_PICKUP = 1001;
const CM_OPENDOOR = 1002;
const CM_TAKEONITEM = 1003; //º¹ÀåÀ» Âø¿ë
const CM_TAKEOFFITEM = 1004; //º¹ÀåÀ» ¹þ´Â´Ù
const CM_EXCHGTAKEONITEM = 1005; //Âø¿ëÇÑ ¾ÆÀÌÅÛÀ» ÁÂ¿ì¸¦ ¹Ù²Û´Ù.(¹ÝÁö,ÆÈÂî)
const CM_EAT = 1006; //¸Ô´Ù, ¸¶½Ã´Ù
const CM_BUTCH = 1007; //µµ·úÇÏ´Ù
const CM_MAGICKEYCHANGE = 1008;
const CM_SOFTCLOSE = 1009;
const CM_CLICKNPC = 1010;
const CM_MERCHANTDLGSELECT = 1011;
const CM_MERCHANTQUERYSELLPRICE = 1012;
const CM_USERSELLITEM = 1013; //¾ÆÀÌÅÛ ÆÈ±â
const CM_USERBUYITEM = 1014;
const CM_USERGETDETAILITEM = 1015;
const CM_DROPGOLD = 1016;
const CM_TEST = 1017; //Å×½ºÆ®
const CM_LOGINNOTICEOK = 1018;
const CM_GROUPMODE = 1019;
const CM_CREATEGROUP = 1020;
const CM_ADDGROUPMEMBER = 1021;
const CM_DELGROUPMEMBER = 1022;
const CM_USERREPAIRITEM = 1023;
const CM_MERCHANTQUERYREPAIRCOST = 1024;
const CM_DEALTRY = 1025;
const CM_DEALADDITEM = 1026;
const CM_DEALDELITEM = 1027;
const CM_DEALCANCEL = 1028;
const CM_DEALCHGGOLD = 1029; //±³È¯ÇÏ´Â µ·ÀÌ º¯°æµÊ
const CM_DEALEND = 1030;
const CM_USERSTORAGEITEM = 1031;
const CM_USERTAKEBACKSTORAGEITEM = 1032;
const CM_WANTMINIMAP = 1033;
const CM_USERMAKEDRUGITEM = 1034;
const CM_OPENGUILDDLG = 1035;
const CM_GUILDHOME = 1036;
const CM_GUILDMEMBERLIST = 1037;
const CM_GUILDADDMEMBER = 1038;
const CM_GUILDDELMEMBER = 1039;
const CM_GUILDUPDATENOTICE = 1040;
const CM_GUILDUPDATERANKINFO = 1041;
const CM_SPEEDHACKUSER = 1042;
const CM_ADJUST_BONUS = 1043;
const CM_GUILDMAKEALLY = 1044;
const CM_GUILDBREAKALLY = 1045;
// Frined System---------------
const CM_FRIEND_ADD = 1046; // Ä£±¸Ãß°¡
const CM_FRIEND_DELETE = 1047; // Ä£±¸»èÁ¦
const CM_FRIEND_EDIT = 1048; // Ä£±¸¼³¸í º¯°æ
const CM_FRIEND_LIST = 1049; // Ä£±¸ ¸®½ºÆ® ¿äÃ»
// Tag System -----------------
const CM_TAG_ADD = 1050; // ÂÊÁö Ãß°¡
const CM_TAG_DELETE = 1051; // ÂÊÁö »èÁ¦
const CM_TAG_SETINFO = 1052; // ÂÊÁö »óÅÂ º¯°æ
const CM_TAG_LIST = 1053; // ÂÊÁö ¸®½ºÆ® ¿äÃ»
const CM_TAG_NOTREADCOUNT = 1054; // ÀÐÁö¾ÊÀº ÂÊÁö °³¼ö ¿äÃ»
const CM_TAG_REJECT_LIST = 1055; // °ÅºÎÀÚ ¸®½ºÆ®
const CM_TAG_REJECT_ADD = 1056; // °ÅºÎÀÚ Ãß°¡
const CM_TAG_REJECT_DELETE = 1057; // °ÅºÎÀÚ »èÁ¦
// Relationship ---------------
const CM_LM_OPTION = 1058; // °ü°è È°¼º / ºñÈ°¼º
const CM_LM_REQUEST = 1059; // °ü°è µî·Ï ¿äÃ»
const CM_LM_Add = 1060; // °ü°è Ãß°¡ ( ³»ºÎÀûÀ¸·Î ¾²ÀÓ )
const CM_LM_EDIT = 1061; // °ü°è ¼öÁ¤
const CM_LM_DELETE = 1062; // °ü°è ÆÄ±â
// UpgradeItem ---------------- by sonmg...2003/10/02
const CM_UPGRADEITEM = 1063; // ¾ÆÀÌÅÛ ¾÷±×·¹ÀÌµå ¿äÃ»
// Ä«¿îÆ® ¾ÆÀÌÅÛ
const CM_DROPCOUNTITEM = 1064; // °ãÄ¡±â ¾ÆÀÌÅÛ ¶³¾î¶ß¸²
// ¾ÆÀÌÅÛ Á¦Á¶
const CM_USERMAKEITEMSEL = 1065;
const CM_USERMAKEITEM = 1066;
const CM_ITEMSUMCOUNT = 1067;

// À§Å¹ÆÇ¸Å -------------------
const CM_MARKET_LIST = 1068; // À§Å¹ÆÇ¸Å ·¹½ºÆ® ¿äÃ»
const CM_MARKET_SELL = 1069; // À§Å¹ÆÇ¸Å À¯Àú -> NPC
const CM_MARKET_BUY = 1070; // À§Å¹»ç±â NPC -> À¯Àú
const CM_MARKET_CANCEL = 1071; // À§Å¹Ãë¼Ò NPC -> À¯Àú
const CM_MARKET_GETPAY = 1072; // À§Å¹±ÝÈ¸¼ö NPC -> À¯Àú
const CM_MARKET_CLOSE = 1073; // À§Å¹»óÁ¡ ÀÌ¿ë ³¡

// Àå¿ø ÆÇ¸Å ¸ñ·Ï
const CM_GUILDAGITLIST = 1074;
const CM_GUILDAGIT_TAG_ADD = 1075; // Àå¿ø ÂÊÁö º¸³»±â

// Àå¿ø°Ô½ÃÆÇ
const CM_GABOARD_LIST = 1076; // Àå¿ø°Ô½ÃÆÇ ¸®½ºÆ®
const CM_GABOARD_ADD = 1077; // Àå¿ø°Ô½ÃÆÇ ±Û¾²±â
const CM_GABOARD_READ = 1078; // Àå¿ø°Ô½ÃÆÇ ±ÛÀÐ±â
const CM_GABOARD_EDIT = 1079; // Àå¿ø°Ô½ÃÆÇ ±Û¼öÁ¤
const CM_GABOARD_DEL = 1080; // Àå¿ø°Ô½ÃÆÇ ±Û»èÁ¦
const CM_GABOARD_NOTICE_CHECK = 1081; // Àå¿ø°Ô½ÃÆÇ °øÁö»çÇ× ¾²±â Ã¼Å©

const CM_TAG_ADD_DOUBLE = 1082; // µÎ¸í µ¿½Ã ÂÊÁö Ãß°¡

// Àå¿ø²Ù¹Ì±â -------------------
const CM_DECOITEM_BUY = 1083; // Àå¿ø²Ù¹Ì±â ¾ÆÀÌÅÛ ±¸ÀÔ

//±×·ì °á¼º È®ÀÎ
const CM_CREATEGROUPREQ_OK = 1084; //±×·ì °á¼º È®ÀÎ
const CM_CREATEGROUPREQ_FAIL = 1085; //±×·ì °á¼º È®ÀÎ

const CM_ADDGROUPMEMBERREQ_OK = 1086; //±×·ì °á¼º È®ÀÎ
const CM_ADDGROUPMEMBERREQ_FAIL = 1087; //±×·ì °á¼º È®ÀÎ

// Relationship (cont.)---------------
const CM_LM_DELETE_REQ_OK = 1088; // °ü°è ÆÄ±â OK
const CM_LM_DELETE_REQ_FAIL = 1089; // °ü°è ÆÄ±â FAIL

const CM_CLIENT_CHECKTIME = 1100;
const CM_CANCLOSE = 1101;

//----------------------------

const RM_TURN = 10001;
const RM_WALK = 10002;
const RM_RUN = 10003;
const RM_HIT = 10004;
const RM_HEAVYHIT = 10005;
const RM_BIGHIT = 10006;
const RM_SPELL = 10007;
const RM_POWERHIT = 10008;
const RM_SITDOWN = 10009;
const RM_MOVEFAIL = 10010;
const RM_LONGHIT = 10011;
const RM_WIDEHIT = 10012;
const RM_PUSH = 10013;
const RM_FIREHIT = 10014;
const RM_RUSH = 10015;
const RM_RUSHKUNG = 10016;
// 2003/03/15 ½Å±Ô¹«°ø
const RM_CROSSHIT = 10017;
const RM_TWINHIT = 10019;
const RM_DECREFOBJCOUNT = 10018;

const RM_STRUCK = 10020;
const RM_DEATH = 10021;
const RM_DISAPPEAR = 10022;
//const RM_HIDE = 10023;
const RM_SKELETON = 10024;
const RM_MAGSTRUCK = 10025; //Ã¼·ÂÀÌ ÀÌ ½ÃÁ¡¿¡¼­ ´â´Â´Ù.
const RM_MAGHEALING = 10026; //Èú¸µ
const RM_STRUCK_MAG = 10027; //¸¶¹ýÀ¸·Î ¸ÂÀ½
const RM_MAGSTRUCK_MINE = 10028; //Áö·Ú“PÀ½
const RM_STONEHIT = 10029;

const RM_HEAR = 10030;
const RM_WHISPER = 10031;
const RM_CRY = 10032;
const RM_TAG_ADD = 10033;

const RM_WINDCUT = 10040; // °øÆÄ¼¶
const RM_DRAGONFIRE = 10041; // Ãµ·æ±â¿°(->È­·æ±â¿°)
const RM_CURSE = 10042; // ÀúÁÖ¼ú

const RM_LOGON = 10050;
const RM_ABILITY = 10051;
const RM_HEALTHSPELLCHANGED = 10052;
const RM_DAYCHANGING = 10053;

const RM_USERNAME = 10043;
const RM_WINEXP = 10044;
const RM_LEVELUP = 10045;
const RM_CHANGENAMECOLOR = 10046;

//2004/06/22 ½Å±Ô¹«°ø(Æ÷½Â°Ë, ÈíÇ÷¼ú, ¸Í¾È¼ú)
const RM_PULLMON = 10047; //Æ÷½Â°Ë, ²ø¾î´ç±è
const RM_SUCKBLOOD = 10048; //ÈíÇ÷¼ú, ÇÇ¸¦ »¡¾ÆµéÀÓ
const RM_BLINDMON = 10049; //¸Í¾È¼ú, ÀûÀÇ ½Ã¾ß¸¦ °¡¸²

const RM_CHANGEFAMEPOINT = 10054; //¸í¼ºÄ¡ º¯È­(2004/11/04)
const RM_GMWHISPER = 10055; //¿î¿µÀÚ ¸ðµåÀÏ ¶§ ±Ó¸»(2004/11/18)
const RM_LM_WHISPER = 10056; //¿¬ÀÎ ±Ó¼Ó¸»

const RM_FOXSTATE = 10057; //ºñ¿ùÃµÁÖ »óÅÂ

const RM_SYSMESSAGE = 10100;
const RM_REFMESSAGE = 10101;
const RM_GROUPMESSAGE = 10102;
const RM_SYSMESSAGE2 = 10103;
const RM_GUILDMESSAGE = 10104;
const RM_SYSMSG_BLUE = 10105;
const RM_SYSMESSAGE3 = 10106;
const RM_SYSMSG_REMARK = 10107;
const RM_SYSMSG_PINK = 10108;
const RM_SYSMSG_GREEN = 10109;

const RM_ITEMSHOW = 10110;
const RM_ITEMHIDE = 10111;
const RM_OPENDOOR_OK = 10112;
const RM_CLOSEDOOR = 10113;
const RM_SENDUSEITEMS = 10114;
const RM_WEIGHTCHANGED = 10115;
const RM_FEATURECHANGED = 10116;
const RM_CLEAROBJECTS = 10117;
const RM_CHANGEMAP = 10118;
const RM_BUTCH = 10119; //
const RM_MAGICFIRE = 10120;
const RM_MAGICFIRE_FAIL = 10121;
const RM_SENDMYMAGIC = 10122;
const RM_MAGIC_LVEXP = 10123;
const RM_SOUND = 10124;
const RM_DURACHANGE = 10125;
const RM_MERCHANTSAY = 10126;
const RM_MERCHANTDLGCLOSE = 10127;
const RM_SENDGOODSLIST = 10128;
const RM_SENDUSERSELL = 10129;
const RM_SENDBUYPRICE = 10130; //»óÁ¡¿¡¼­ »ç¿ëÀÚÀÇ ¾ÆÀÌÅÛÀ» »ç´Â °¡°Ý
const RM_USERSELLITEM_OK = 10131;
const RM_USERSELLITEM_FAIL = 10132;
const RM_BUYITEM_SUCCESS = 10133;
const RM_BUYITEM_FAIL = 10134;
const RM_SENDDETAILGOODSLIST = 10135;
const RM_GOLDCHANGED = 10136;
const RM_CHANGELIGHT = 10137;
const RM_LAMPCHANGEDURA = 10138;
const RM_CHARSTATUSCHANGED = 10139;
const RM_GROUPCANCEL = 10140;
const RM_SENDUSERREPAIR = 10141;
const RM_SENDREPAIRCOST = 10142;
const RM_USERREPAIRITEM_OK = 10143;
const RM_USERREPAIRITEM_FAIL = 10144;
//const RM_ITEMDURACHANGE = 10145;
const RM_SENDUSERSTORAGEITEM = 10146;
const RM_SENDUSERSTORAGEITEMLIST = 10147;
const RM_DELITEMS = 10148; //¾ÆÀÌÅÛ ÀÐ¾î ¹ö¸², Å¬¶óÀÌ¾ðÅ×¿¡ ¾Ë¸².
const RM_SENDUSERMAKEDRUGITEMLIST = 10149;
const RM_MAKEDRUG_SUCCESS = 10150;
const RM_MAKEDRUG_FAIL = 10151;
const RM_SENDUSERSPECIALREPAIR = 10152;
const RM_ALIVE = 10153;
const RM_DELAYMAGIC = 10154;
const RM_RANDOMSPACEMOVE = 10155;
// ¾ÆÀÌÅÛ Á¦Á¶
const RM_SENDUSERMAKEITEMLIST = 10156;

const RM_DIGUP = 10200;
const RM_DIGDOWN = 10201;
const RM_FLYAXE = 10202;
const RM_ALLOWPOWERHIT = 10203;
const RM_LIGHTING = 10204;
const RM_NORMALEFFECT = 10205; //±âº» È¿°ú
const RM_DRAGON_FIRE1 = 10206;
const RM_DRAGON_FIRE2 = 10207;
const RM_DRAGON_FIRE3 = 10208;
const RM_LIGHTING_1 = 10209;
const RM_LIGHTING_2 = 10210;
const RM_LIGHTING_3 = 10211;

const RM_MAKEPOISON = 10300;
const RM_CHANGEGUILDNAME = 10301; //±æµåÀÇ ÀÌ¸§, ±æµå³» Á÷Ã¥ÀÌ¸§ º¯°æ
const RM_SUBABILITY = 10302;
const RM_BUILDGUILD_OK = 10303;
const RM_BUILDGUILD_FAIL = 10304;
const RM_DONATE_FAIL = 10305;
const RM_DONATE_OK = 10306;
const RM_MYSTATUS = 10307;
const RM_TRANSPARENT = 10308;
const RM_MENU_OK = 10309;

const RM_SPACEMOVE_HIDE = 10330;
const RM_SPACEMOVE_SHOW = 10331;
const RM_RECONNECT = 10332;
const RM_HIDEEVENT = 10333;
const RM_SHOWEVENT = 10334;
const RM_SPACEMOVE_HIDE2 = 10335;
const RM_SPACEMOVE_SHOW2 = 10336;
const RM_ZEN_BEE = 10337; //ºñ¸·¿øÃæÀÌ ºñ¸·ÃæÀ» ¸¸µé¾î ³½´Ù.
const RM_DELAYATTACK = 10338; //Å¸°Ý ½ÃÁ¡À» ¸ÂÃß±â À§ÇØ¼­
const RM_SPACEMOVE_SHOW_NO = 10339; //ÀÌÆåÆ® ¾øÀÌ ³ªÅ¸³²

const RM_ADJUST_BONUS = 10400; //º¸³Ê½º Æ÷ÀÎÆ®¸¦ Á¶Á¤ÇÏ¶ó.
const RM_MAKE_SLAVE = 10401; //¼­¹öÀÌµ¿À¸·Î ºÎÇÏ°¡ µû¶ó¿Â´Ù.

const RM_OPENHEALTH = 10410; //Ã¼·ÂÀÌ »ó´ë¹æ¿¡ º¸ÀÓ
const RM_CLOSEHEALTH = 10411; //Ã¼·ÂÀÌ »ó´ë¹æ¿¡°Ô º¸ÀÌÁö ¾ÊÀ½
const RM_DOOPENHEALTH = 10412;
const RM_BREAKWEAPON = 10413; //¹«±â°¡ ±úÁü, ¾Ö¹Ì¸ÞÀÌ¼Ç È¿°ú
const RM_INSTANCEHEALGUAGE = 10414;
const RM_CHANGEFACE = 10415; //º¯½Å...
const RM_NEXTTIME_PASSWORD = 10416; //´ÙÀ½ ÇÑ¹øÀº ºñ¹Ð¹øÈ£ÀÔ·Â ¸ðµå
const RM_DOSTARTUPQUEST = 10417;
const RM_TAG_ALARM = 10418; //³»ºÎÀûÀ¸·Î ÂÊÁö¿ÔÀ½¾Ë¸²

const RM_LM_DBWANTLIST = 10420; // ¿¬ÀÎ»çÁ¦ ¸®½ºÆ®¿øÇÔ
const RM_LM_DBADD = 10421; // ¿¬ÀÎ»çÁ¦ ¸®½ºÆ®¿øÇÔ
const RM_LM_DBEDIT = 10422; // ¿¬ÀÎ»çÁ¦ ¸®½ºÆ®¿øÇÔ
const RM_LM_DBDELETE = 10423; // ¿¬ÀÎ»çÁ¦ ¸®½ºÆ®¿øÇÔ
const RM_LM_DBGETLIST = 10424; // ¿¬ÀÎ»çÁ¦ ¸®½ºÆ®¾òÀ½
const RM_LM_LOGOUT = 10425; // ¿¬ÀÎ Á¾·á¸¦ ¾Ë·ÁÁÜ

const RM_DRAGON_EXP = 10430; // ¿ë½Ã½ºÅÛ¿¡ °æÇèÄ¡ ÁØ´Ù.

const RM_LOOPNORMALEFFECT = 10431; //·çÇÁ ÀÓÆåÆ® È¿°ú
const RM_LOOPSCREENEFFECT = 10432; //È­¸é ÀÌÆåÆ®

const RM_PLAYDICE = 10500;
const RM_PLAYROCK = 10501;
// 2003/02/11 ±×·ì¿ø À§Ä¡ Á¤º¸
const RM_GROUPPOS = 11008;

// Ä«¿îÆ® ¾ÆÀÌÅÛ
const RM_COUNTERITEMCHANGE = 11011;
const RM_USERSELLCOUNTITEM_OK = 11012;
const RM_USERSELLCOUNTITEM_FAIL = 11013;
// ¾ÆÀÌÅÛ Á¦Á¶
const RM_SENDUSERMAKEFOODLIST = 11014;
// ¾ÆÀÌÅÛ À§Å¹ÆÇ¸Å
const RM_MARKET_LIST = 11015;
const RM_MARKET_RESULT = 11016;

// Àå¿ø ÆÇ¸Å ¸ñ·Ï
const RM_GUILDAGITLIST = 11017;
const RM_GUILDAGITDEALTRY = 11018;

// Àå¿ø°Ô½ÃÆÇ
const RM_GABOARD_LIST = 11019; // Àå¿ø°Ô½ÃÆÇ ¸®½ºÆ®
const RM_GABOARD_NOTICE_OK = 11020; // Àå¿ø°Ô½ÃÆÇ °øÁö»çÇ× ¾²±â OK
const RM_GABOARD_NOTICE_FAIL = 11021; // Àå¿ø°Ô½ÃÆÇ °øÁö»çÇ× ¾²±â FAIL

// Àå¿ø²Ù¹Ì±â
const RM_DECOITEM_LIST = 11022; // Àå¿ø²Ù¹Ì±â ¾ÆÀÌÅÛ ¸®½ºÆ®
const RM_DECOITEM_LISTSHOW = 11023; // Àå¿ø²Ù¹Ì±â ¾ÆÀÌÅÛ ¸®½ºÆ®Ã¢ ¶ç¿ì±â

const RM_CANCLOSE_OK = 11024;
const RM_CANCLOSE_FAIL = 11025;



//----------------------------
//¼­¹ö°£ ¸Þ¼¼Áö¼­¹ö¸¦ °ÅÄ¡Áö ¾ÊÀº ¸Þ¼¼Â¡

const ISM_PASSWDSUCCESS = 100; //ÆÐ½º¿öµå Åë°ú, Certification+ID
const ISM_CANCELADMISSION = 101; //Certification ½ÂÀÎÃë¼Ò..
const ISM_USERCLOSED = 102; //»ç¿ëÀÚ Á¢¼Ó ²÷À½
const ISM_USERCOUNT = 103; //ÀÌ ¼­¹öÀÇ »ç¿ëÀÚ ¼ö
const ISM_TOTALUSERCOUNT = 104;
const ISM_SHIFTVENTURESERVER = 110;
const ISM_ACCOUNTEXPIRED = 111;
const ISM_GAMETIMEOFTIMECARDUSER = 112;
const ISM_USAGEINFORMATION = 113;
const ISM_FUNC_USEROPEN = 114;
const ISM_FUNC_USERCLOSE = 115;
const ISM_CHECKTIMEACCOUNT = 116;
const ISM_REQUEST_PUBLICKEY = 117;
const ISM_SEND_PUBLICKEY = 118;
const ISM_PREMIUMCHECK = 119;
const ISM_EVENTCHECK = 120;

//----------------------------

const ISM_USERSERVERCHANGE = 200;
const ISM_USERLOGON = 201;
const ISM_USERLOGOUT = 202;
const ISM_WHISPER = 203;
const ISM_SYSOPMSG = 204;
const ISM_ADDGUILD = 205;
const ISM_DELGUILD = 206;
const ISM_RELOADGUILD = 207;
const ISM_GUILDMSG = 208;
const ISM_CHATPROHIBITION = 209; //Ã¤±Ý
const ISM_CHATPROHIBITIONCANCEL = 210; //Ã¤±ÝÇØÁ¦
const ISM_CHANGECASTLEOWNER = 211; //»çºÏ¼º ÁÖÀÎ º¯°æ
const ISM_RELOADCASTLEINFO = 212; //»çºÏ¼ºÁ¤º¸°¡ º¯°æµÊ
const ISM_RELOADADMIN = 213;

// Friend System -------------
const ISM_FRIEND_INFO = 214; // Ä£±¸Á¤º¸ Ãß°¡
const ISM_FRIEND_DELETE = 215; // Ä£±¸ »èÁ¦
const ISM_FRIEND_OPEN = 216; // Ä£±¸ ½Ã½ºÅÛ ¿­±â
const ISM_FRIEND_CLOSE = 217; // Ä£±¸ ½Ã½ºÅÛ ´Ý±â
const ISM_FRIEND_RESULT = 218; // °á°ú°ª Àü¼Û
// Tag System ----------------
const ISM_TAG_SEND = 219; // ÂÊÁö Àü¼Û
const ISM_TAG_RESULT = 220; // °á°ú°ª Àü¼Û
// User System --------------
const ISM_USER_INFO = 221; // À¯ÀúÀÇ Á¢¼Ó»óÅÂ Àü¼Û
// 2003/06/12 ½½·¹ÀÌºê ÆÐÄ¡
const ISM_CHANGESERVERRECIEVEOK = 222;
// 2003/08/28 Ã¤ÆÃ·Î±×
const ISM_RELOADCHATLOG = 223;
// À§Å¹ÆÇ¸Å ¿­°í ´ÝÀ½
const ISM_MARKETOPEN = 224;
const ISM_MARKETCLOSE = 225;
// relationship --------------
//   ISM_LM_INFO             = 224;   // °ü°è Á¤º¸ Àü¼Û
//   ISM_LM_LEVELINFO        = 225;   // °ü°è ·¹º§Á¤º¸ Àü¼Û
const ISM_LM_DELETE = 226;

// Á¦Á¶ Àç·á ¸ñ·Ï ------------(sonmg)
const ISM_RELOADMAKEITEMLIST = 227; // Á¦Á¶ Àç·á ¸ñ·Ï ¸®·Îµå

// ¹®¿ø¼ÒÈ¯ ------------(sonmg)
const ISM_GUILDMEMBER_RECALL = 228; // ¹®¿ø¼ÒÈ¯
const ISM_RELOADGUILDAGIT = 229; // ¹®ÆÄÀå¿øÁ¤º¸ ¸®·Îµå.

//¿¬ÀÎ
const ISM_LM_WHISPER = 230;
const ISM_GMWHISPER = 231; //¿î¿µÀÚ ±Ó¸»
//¿¬ÀÎ(sonmg 2005/04/04)
const ISM_LM_LOGIN = 232; //¿¬ÀÎ ·Î±×ÀÎ
const ISM_LM_LOGOUT = 233; //¿¬ÀÎ ·Î±×¾Æ¿ô
const ISM_REQUEST_RECALL = 234; //¼ÒÈ¯ ¿äÃ»
const ISM_RECALL = 235; //¼­¹ö°£ ¼ÒÈ¯
const ISM_LM_LOGIN_REPLY = 236; //·Î±×ÀÎ ÇßÀ» ¶§ ¿¬ÀÎÀÇ À§Ä¡Á¤º¸
const ISM_LM_KILLED_MSG = 237; //¿¬ÀÎ »ìÇØ ¸Þ½ÃÁö
const ISM_REQUEST_LOVERRECALL = 238; //¿¬ÀÎ ¼ÒÈ¯ ¿äÃ»

const ISM_STANDARDTICKREQ = 239; //0¹ø ¼­¹öÀÇ Ç¥ÁØ Æ½ Á¤º¸¿äÃ»
const ISM_STANDARDTICK = 240; //0¹ø ¼­¹öÀÇ Ç¥ÁØ Æ½ Á¤º¸

const ISM_GUILDWAR = 241;

//----------------------------

const DB_LOADHUMANRCD = 100;
const DB_SAVEHUMANRCD = 101;
const DB_SAVEANDCHANGE = 102;
const DB_IDPASSWD = 103;
const DB_NEWUSERID = 104;
const DB_CHANGEPASSWD = 105;
const DB_QUERYCHR = 106;
const DB_NEWCHR = 107;
const DB_GETOTHERNAMES = 108;
const DB_ISVALIDUSER = 111;
const DB_DELCHR = 112;
const DB_ISVALIDUSERWITHID = 113;
const DB_CONNECTIONOPEN = 114;
const DB_CONNECTIONCLOSE = 115;
const DB_SAVELOGO = 116;
const DB_GETACCOUNT = 117;
const DB_SAVESPECFEE = 118;
const DB_SAVELOGO2 = 119;
const DB_GETSERVER = 120;
const DB_CHANGESERVER = 121;
const DB_LOGINCLOSEUSER = 122;
const DB_RUNCLOSEUSER = 123;
const DB_UPDATEUSERINFO = 124;
// Friend System -------------
const DB_FRIEND_LIST = 125; // Ä£±¸ ¸®½ºÆ® ¿ä±¸
const DB_FRIEND_ADD = 126; // Ä£±¸ Ãß°¡
const DB_FRIEND_DELETE = 127; // Ä£±¸ »èÁ¦
const DB_FRIEND_OWNLIST = 128; // Ä£±¸·Î µî·ÏÇÑ »ç¶÷ ¸®½ºÆ® ¿ä±¸
const DB_FRIEND_EDIT = 129; // Ä£±¸ ¼³¸í ¼öÁ¤
// Tag System ----------------
const DB_TAG_ADD = 130; // ÂÊÁö Ãß°¡
const DB_TAG_DELETE = 131; // ÂÊÁö »èÁ¦
const DB_TAG_DELETEALL = 132; // ÂÊÁö ÀüºÎ »èÁ¦ ( °¡´ÉÇÑ°Í¸¸ )
const DB_TAG_LIST = 133; // ÂÊÁö ¸®½ºÆ® Ãß°¡
const DB_TAG_SETINFO = 134; // ÃËÁö »óÅÂ º¯°æ
const DB_TAG_REJECT_ADD = 135; // °ÅºÎÀÚ Ãß°¡
const DB_TAG_REJECT_DELETE = 136; // °ÅºÎÀÚ »èÁ¦
const DB_TAG_REJECT_LIST = 137; // °ÅºÎÀÚ ¸®½ºÆ® ¿äÃ»
const DB_TAG_NOTREADCOUNT = 138; // ÀÐÁö¾ÊÀº ÂÊÁö °³¼ö ¿äÃ»
// RelationShip --------------
const DB_LM_LIST = 139; // °ü°èÀÚ ¸®½ºÆ® ¿ä±¸
const DB_LM_ADD = 140; // °ü°èÀÚ Ãß°¡
const DB_LM_EDIT = 141; // °ü°èÀÚ ¼³Á¤ º¯°æ
const DB_LM_DELETE = 142; // °ü°èÀÚ »èÁ¦

const DBR_LOADHUMANRCD = 1100;
const DBR_SAVEHUMANRCD = 1101;
const DBR_IDPASSWD = 1103;
const DBR_NEWUSERID = 1104;
const DBR_CHANGEPASSWD = 1105;
const DBR_QUERYCHR = 1106;
const DBR_NEWCHR = 1107;
const DBR_GETOTHERNAMES = 1108;
const DBR_ISVALIDUSER = 1111;
const DBR_DELCHR = 1112;
const DBR_ISVALIDUSERWITHID = 1113;
const DBR_GETACCOUNT = 1117;
const DBR_GETSERVER = 1200;
const DBR_CHANGESERVER = 1201;
const DBR_UPDATEUSERINFO = 1202;
// Friend System ---------------
const DBR_FRIEND_LIST = 1203; // Ä£±¸ ¸®½ºÆ® Àü¼Û
const DBR_FRIEND_WONLIST = 1204; // Ä£±¸·Î µî·ÏÇÑ »ç¶÷ Àü¼Û
const DBR_FRIEND_RESULT = 1205; // ¸í·É¾î¿¡ ´ëÇÑ °á°ú°ª
// Tag System ------------------
const DBR_TAG_LIST = 1206; // ÂÊÁö ¸®½ºÆ® Àü¼Û
const DBR_TAG_REJECT_LIST = 1207; // °ÅºÎÀÚ ¸®½ºÆ® Àü¼Û
const DBR_TAG_NOTREADCOUNT = 1208; // ÀÐÁö¾ÊÀº ÂÊÁö »õ¼ö Àü¼Û
const DBR_TAG_RESULT = 1209; // ¸ê·É¿¡ ´ëÇÑ °á°ú°ª
// RelationShip ---------------
const DBR_LM_LIST = 1210; // °ü°è ¸®½ºÆ® ¾ò¾î¿À±â
const DBR_LM_RESULT = 1211; // ¸í·É¾î¿¡ ´ëÇÑ °á°ú°ª

const DBR_FAIL = 2000;
const DBR_NONE = 2000;

//----------------------------

const MSM_LOGIN = 1;
const MSM_GETUSERKEY = 100;
const MSM_SELECTUSERKEY = 101;
const MSM_GETGROUPKEY = 102;
const MSM_SELECTGROUPKEY = 103;
const MSM_UPDATEFEERCD = 120;
const MSM_DELETEFEERCD = 121;
const MSM_ADDFEERCD = 122;
const MSM_GETTIMEOUTLIST = 123;

const MCM_PASSWDSUCCESS = 10;
const MCM_PASSWDFAIL = 11;
const MCM_IDONUSE = 12;
const MCM_GETFEERCD = 1000;
const MCM_ADDFEERCD = 1001;
const MCM_ENDTIMEOUT = 1002;
const MCM_ONUSETIMEOUT = 1003;


//°ÔÀÌÆ®¿Í ¼­¹ö¿ÍÀÇ Åë½Å

const GM_SECRETCODE = 0xAA55AA55;
const GM_OPEN = 1;
const GM_CLOSE = 2;
const GM_CHECKSERVER = 3; //¼­¹ö¿¡¼­ Ã¤Å© ½ÅÈ£¸¦ º¸³¿
const GM_CHECKCLIENT = 4; //Å¬¶óÀÌ¾ðÆ®¿¡¼­ Ã¤Å© ½ÅÈ£¸¦ º¸³¿
const GM_DATA = 5;
const GM_SERVERUSERINDEX = 6;
const GM_RECEIVE_OK = 7;
const GM_SENDPUBLICKEY = 8;
const GM_TEST = 20;

//----------------------------


//Á¾Á·
const RC_USERHUMAN = 0; //°æÇèÄ¡¸¦ ¾òÀ» ¼ö ¾øÀ½
const RC_NPC = 10;
const RC_DOORGUARD = 11; //¹®Áö±â °æºñº´
const RC_PEACENPC = 15;

const RC_ARCHERPOLICE = 20;

const RC_ANIMAL = 50;
const RC_HEN = 51; //´ß
const RC_DEER = 52; //»ç½¿...
const RC_WOLF = 53; //´Á´ë
const RC_RUNAWAYHEN = 54; //´Þ¾Æ³ª´Â ´ß
const RC_TRAINER = 55; //¼ö·ÃÁ¶±³
const RC_MONSTER = 80; //ºñ¼±¸÷
const RC_OMA = 81;
const RC_SPITSPIDER = 82;
const RC_SLOWMONSTER = 83;
const RC_SCORPION = 84; //Àü°¥
const RC_KILLINGHERB = 85; //½ÄÀÎÃÊ
const RC_SKELETON = 86; //ÇØ°ñ
const RC_DUALAXESKELETON = 87; //½Öµµ³¢ÇØ°ñ
const RC_HEAVYAXESKELETON = 88; //Å«µµ³¢ÇØ°ñ
const RC_KNIGHTSKELETON = 89; //ÇØ°ñÀü»ç
const RC_BIGKUDEKI = 90;
const RC_MAGCOWFACEMON = 91;
const RC_COWFACEKINGMON = 92;
const RC_THORNDARK = 93;
const RC_LIGHTINGZOMBI = 94;
const RC_DIGOUTZOMBI = 95;
const RC_ZILKINZOMBI = 96;
const RC_COWMON = 97; //¿ì¸é±Í
const RC_WHITESKELETON = 100; //¹é°ñ
const RC_SCULTUREMON = 101; //¼®»ó¸ó½ºÅÍ
const RC_SCULKING = 102; //ÁÖ¸¶¿Õ
const RC_BEEQUEEN = 103; //¹úÅë
const RC_ARCHERMON = 104; //¸¶±Ã»ç, ÇØ°ñ±Ã¼ö
const RC_GASMOTH = 105;
const RC_DUNG = 106; //µÕ, °¡½º
const RC_CENTIPEDEKING = 107; //Áö³×¿Õ
const RC_BLACKPIG = 108; //Èæµ·
const RC_CASTLEDOOR = 110; //»çºÏ¼º¹®, ¼ºº®,..
const RC_WALL = 111; //»çºÏ¼º¹®, ¼ºº®,..
const RC_ARCHERGUARD = 112; //±Ã¼ö°æºñ
const RC_ELFMON = 113;
const RC_ELFWARRIORMON = 114;
const RC_BIGHEARTMON = 115; //Ç÷°ÅÀÎ ¿Õ Å« ½ÉÀå
const RC_SPIDERHOUSEMON = 116; //Æø¾È°Å¹Ì
const RC_EXPLOSIONSPIDER = 117; //ÆøÁÖ
const RC_HIGHRISKSPIDER = 118; //°Å´ë °Å¹Ì
const RC_BIGPOISIONSPIDER = 119; //°Å´ë µ¶°Å¹Ì
const RC_SOCCERBALL = 120; //Ãà±¸°ø
const RC_BAMTREE = 121;

const RC_SCULKING_2 = 122; //Â¦Åü ÁÖ¸¶¿Õ
const RC_BLACKSNAKEKING = 123; //Èæ»ç¿Õ
const RC_NOBLEPIGKING = 124; //±Íµ·¿Õ
const RC_FEATHERKINGOFKING = 125; //ÈæÃµ¸¶¿Õ
// 2003/02/11 Ãß°¡ ¸÷
const RC_SKELETONKING = 126; //ÇØ°ñ¹Ý¿Õ
const RC_TOXICGHOST = 127; //ºÎ½Ä±Í
const RC_SKELETONSOLDIER = 128; //ÇØ°ñº´Á¹
// 2003/03/04 Ãß°¡ ¸÷
const RC_BANYAGUARD = 129; //¹Ý¾ßÁÂ»ç/¹Ý¾ß¿ì»ç
const RC_DEADCOWKING = 130; //»ç¿ìÃµ¿Õ
// 2003/07/15 Ãß°¡ ¸÷
const RC_PBOMA1 = 131; //³¯°³¿À¸¶
const RC_PBOMA2 = 132; //¼è¹¶Ä¡»ó±Þ¿À¸¶
const RC_PBOMA3 = 133; //¸ùµÕÀÌ»ó±Þ¿À¸¶
const RC_PBOMA4 = 134; //Ä®ÇÏ±Þ¿À¸¶
const RC_PBOMA5 = 135; //µµ³¢ÇÏ±Þ¿À¸¶
const RC_PBOMA6 = 136; //È°ÇÏ±Þ¿À¸¶
const RC_PBGUARD = 137; //°ú°ÅºñÃµ Ã¢°æºñ
const RC_PBMSTONE1 = 138; //¸¶°è¼®1
const RC_PBMSTONE2 = 139; //¸¶°è¼®2
const RC_PBKING = 140; //¿À¸¶ÆÄÃµÈ²(ÆÄÈ²¸¶½Å)
const RC_MINE = 141; //Áö·Ú

const RC_ANGEL = 142; //¿ù·É(Ãµ³à)
const RC_CLONE = 143; //ºÐ½Å
const RC_FIREDRAGON = 144; //ÆÄÃµ¸¶·æ (È­·æ)
const RC_DRAGONBODY = 145; //È­·æ¸ö
const RC_DRAGONSTATUE = 146; //¿ë¼®»ó

const RC_EYE_PROG = 147; //¼³ÀÎ´ëÃæ
const RC_STON_SPIDER = 148; //½Å¼®µ¶¸¶ÁÖ
const RC_GHOST_TIGER = 149; //È¯¿µÇÑÈ£
const RC_JUMA_THUNDER = 150; //ÁÖ¸¶°Ý·ÚÀå

const RC_GOLDENIMUGI = 151; //È²±ÝÀÌ¹«±â

const RC_MONSTERBOX = 152; //¸ó½ºÅÍ¹Ú½º
const RC_STICKBLOCK = 153; //È£È¥¼®
const RC_FOXWARRIOR = 154; //ºñ¿ù¿©¿ì(Àü»ç) ºñ¿ùÈæÈ£
const RC_FOXWIZARD = 155; //ºñ¿ù¿©¿ì(¼ú»ç) ºñ¿ùÀûÈ£
const RC_FOXTAOIST = 156; //ºñ¿ù¿©¿ì(µµ»ç) ºñ¿ù¼ÒÈ£
const RC_PUSHEDMON = 157; //È£±â¿¬
const RC_PUSHEDMON2 = 158; //È£±â¿Á
const RC_FOXPILLAR = 159; //È£È¥±â¼®
const RC_FOXBEAD = 160; //ºñ¿ùÃµÁÖ
const RC_ARCHERMASTER = 161; //±Ã¼öÈ£À§º´(2005/08)
//2005/12/14
const RC_NEARTURTLE = 162; //±Ù°Å¸® °ÅºÏ
const RC_FARTURTLE = 163; //¿ø°Å¸® °ÅºÏ
const RC_BOSSTURTLE = 164; //º¸½º °ÅºÏ(Çö¹«)
//2005/11/01
const RC_SUPEROMA = 181; //¼öÆÛ¿À¸¶
const RC_TOGETHEROMA = 182; //¹¶Ä¡¸é °­ÇØÁö´Â ¿À¸¶

const RC_CLONEMON = 183; //ºÐ½Å¸ó½ºÅÍ


//Å¬¶óÀÌ¾ðÆ® Á¾Á·...
const RCC_HUMAN = 0;
const RCC_GUARD = 12;
const RCC_GUARD2 = 24;
const RCC_MERCHANT = 50;
const RCC_FIREDRAGON = 83; // ÆÄÃµ¸¶·æ (È­·æ)

const LA_CREATURE = 0;
const LA_UNDEAD = 1;


const MP_CANMOVE = 0;
const MP_WALL = 1;
const MP_HIGHWALL = 2;

const DR_UP = 0;
const DR_UPRIGHT = 1;
const DR_RIGHT = 2;
const DR_DOWNRIGHT = 3;
const DR_DOWN = 4;
const DR_DOWNLEFT = 5;
const DR_LEFT = 6;
const DR_UPLEFT = 7;

const U_DRESS = 0;
const U_WEAPON = 1;
const U_RIGHTHAND = 2;
const U_NECKLACE = 3;
const U_HELMET = 4;
const U_ARMRINGL = 5;
const U_ARMRINGR = 6;
const U_RINGL = 7;
const U_RINGR = 8;
// 2003/03/15 ¾ÆÀÌÅÛ ÀÎº¥Åä¸® È®Àå
const U_BUJUK = 9;
const U_BELT = 10;
const U_BOOTS = 11;
const U_CHARM = 12;
const U_UNEQUIP = 100;

const U_BAG = 50;
const U_SAVE = 51;

const UD_USER = 0;
const UD_USER2 = 1;
const UD_OBSERVER = 2; // '2' µî±Þ
const UD_ASSISTANT = 4; // 'A' µî±Þ(observerµî±Þ°ú sysopµî±Þ »çÀÌ¿¡ Ãß°¡)
const UD_SYSOP = 6; // '1' µî±Þ
const UD_ADMIN = 8; // '*' µî±Þ
const UD_SUPERADMIN = 10; // '*' µî±Þ(Å×½ºÆ® ¼­¹ö ¶Ç´Â ÆÐ½º¿öµå ¼º°ø ÈÄ)

const ET_DIGOUTZOMBI = 1; //Á»ºñ°¡ ¶¥ÆÄ°í ³ª¿Â ÈçÀû
const ET_MINE = 2; //±¤¼®ÀÌ ¸ÅÀåµÇ¾î ÀÖÀ½
const ET_PILESTONES = 3; //µ¹¹«´õ±â
const ET_HOLYCURTAIN = 4; //°á°è
const ET_FIRE = 5;
const ET_SCULPEICE = 6; //ÁÖ¸¶¿ÕÀÇ µ¹±úÁø Á¶°¢
const ET_HEARTPALP = 7; //Ç÷°ÅÀÎ ¿Õ(½ÉÀå)¹æÀÇ ÃË¼ö °ø°Ý
const ET_MINE2 = 8; //º¸¼®ÀÌ ¸ÅÀåµÇ¾î ÀÖÀ½
const ET_JUMAPEICE = 9; //ÁÖ¸¶°Ý·ÚÀå ƒÆÁø Á¶°¢
const ET_MINE3 = 10; //ÀÌº¥Æ®¿ë ±¤¼® ¹× º¸¼®ÀÌ ¸ÅÀåµÇ¾î ÀÖÀ½(2004/11/03)

const NE_HEARTPALP = 1; //±âº» È¿°ú ½Ã¸®Áî, 1¹ø ÃË¼ö°ø°Ý
const NE_CLONESHOW = 2; //ºÐ½Å³ªÅ¸³²
const NE_CLONEHIDE = 3; //ºÐ½Å»ç¶óÁü
const NE_THUNDER = 4; //¿ë´øÁ¯ ¹ø°³
const NE_FIRE = 5; //¿ë´øÁ¯ ¿ë¾Ï
const NE_DRAGONFIRE = 6; //¿ëºÒ°ø°Ý ÅÍÁü
const NE_FIREBURN = 7; //¿ë¼®»ó°ø°Ý ÅÍÁü Å¸¿À¸§
const NE_FIRECIRCLE = 8; //È­·æ±â¿°
//2004/06/22 ½Å±Ô¹«°ø ÀÌÆåÆ®.
const NE_MONCAPTURE = 9; //Æ÷½Â°Ë-Æ÷È¹ ÀÌÆåÆ®
const NE_BLOODSUCK = 10; //ÈíÇ÷¼ú-ÈíÀÔ ÀÌÆåÆ®
const NE_BLINDEFFECT = 11; //¸Í¾È¼ú ÀÌÆåÆ®
const NE_FLOWERSEFFECT = 12; //²ÉÀÙ ÀÌÆåÆ®
const NE_LEVELUP = 13; //·¹º§¾÷ ÀÌÆåÆ®
const NE_RELIVE = 14; //ºÎÈ° ÀÌÆåÆ®
const NE_POISONFOG = 15; //ÀÌ¹«±â µ¶¾È°³ ÀÓÆåÆ®
const NE_SN_MOVEHIDE = 16; //ÀÌ¹«±â ¿öÇÁ »ç¶óÁö´ÂÀÓÆåÆ®
const NE_SN_MOVESHOW = 17; //ÀÌ¹«±â ¿öÇÁ ³ªÅ¸³ª´ÂÀÓÆåÆ®
const NE_SN_RELIVE = 18; //ÀÌ¹«±â ºÎÈ° ÀÓÆåÆ®
const NE_BIGFORCE = 19; //¹«±ØÁø±â ÀÓÆåÆ®
const NE_JW_EFFECT1 = 20; //Àå¿ø ÀÌÆåÆ®
const NE_FOX_MOVEHIDE = 21; //¼ú»çºñ¿ù¿©¿ì ¼ø°£ÀÌµ¿ ÀÓÆåÆ®
const NE_FOX_FIRE = 22; //¼ú»çºñ¿ù¿©¿ì È­¿° ·çÇÁ ÀÓÆåÆ®
const NE_FOX_MOVESHOW = 23; //¼ú»çºñ¿ù¿©¿ì ³ªÅ¸³ª´Â ÀÓÆåÆ®
const NE_SOULSTONE_HIT = 24; //È£È¥¼® °ø°Ý ÀÓÆåÆ®
const NE_KINGSTONE_RECALL_1 = 25; //ºñ¿ùÃµÁÖ ¼ÒÈ¯ ºñ¿ùÃµÁÖ¿¡°Ô »Ñ·ÁÁÜ
const NE_KINGSTONE_RECALL_2 = 26; //ºñ¿ùÃµÁÖ ¼ÒÈ¯ Ä³¸¯¿¡°Ô »Ñ·ÁÁÜ
const NE_SIDESTONE_PULL = 27; //È£È¥±â¼® ´ç±â±â
const NE_HAPPYBIRTHDAY = 28; //ÇÁ¸®¹Ì¾ö »ýÀÏ ÀÓÆåÆ®
const NE_KINGTURTLE_MOBSHOW = 29; //Çö¹«Çö½Å ¼ÒÈ¯¸÷ ³ªÅ¸³ª´ÂÀÓÆåÆ®
const NE_USERHEALING = 30; //ÃÊº¸ÀÚÁö¿ª NPCÈú ÀÌÆåÆ®
const NE_DEFENCEEFFECT = 31; //¿µÁ¤°©ÁÖ ¹Ý»ç ÀÌÆåÆ®
const NE_KOREAFIGHTING = 32; //¿ùµåÄÅÀÀ¿ø

const SWD_LONGHIT = 12; //¾î°Ë¼ú
const SWD_WIDEHIT = 25; //¹Ý¿ù°Ë¹ý
const SWD_FIREHIT = 26; //¿°È­°á
const SWD_RUSHRUSH = 27; //¹«ÅÂº¸
// 2003/03/15 ½Å±Ô¹«°ø
const SWD_CROSSHIT = 34; //±¤Ç³Âü
const SWD_TWINHIT = 38; //½Ö·æÂü
const SWD_STONEHIT = 43; //»çÀÚÈÄ

// Äù½ºÆ® °ü·Ã
// IF
const QI_CHECK = 1; //101ÀÌ»ó
const QI_RANDOM = 2;
const QI_GENDER = 3; //MAN or WOMAN
const QI_DAYTIME = 4; //SUNRAISE DAY SUNSET NIGHT
const QI_CHECKOPENUNIT = 5; //À¯´ÖÃ¼Å©
const QI_CHECKUNIT = 6; //À¯´ÖÃ¼Å©
const QI_CHECKLEVEL = 7;
const QI_CHECKJOB = 8; //Warrior, Wizard, Taoist
const QI_CHECKITEM = 20;
const QI_CHECKITEMW = 21;
const QI_CHECKGOLD = 22;
const QI_ISTAKEITEM = 23; //¹æ±ÝÀü¿¡ ¹ÞÀº ¾ÆÀÌÅÛÀÌ ¹«¾ùÀÎÁö °Ë»ç
const QI_CHECKDURA = 24; //¾ÆÀÌÅÛÀÇ ¾ÆÀÌÅÛÀÇ Æò±Õ ³»±¸(dura / 1000) °Ë»ç
// ¿©·¯°³ ÀÖ´Â °æ¿ì ÃÖ°í ³»±¸¸¦ °Ë»ç
const QI_CHECKDURAEVA = 25;
const QI_DAYOFWEEK = 26; //¿äÀÏ °Ë»ç
const QI_TIMEHOUR = 27; //½Ã°£´ÜÀ§ °Ë»ç(0..23)
const QI_TIMEMIN = 28; //ºÐ °Ë»ç
const QI_CHECKPKPOINT = 29;
const QI_CHECKLUCKYPOINT = 30;
const QI_CHECKMON_MAP = 31; //ÇöÀç ¸Ê¿¡ ¸÷ÀÌ ÀÖ´ÂÁö
const QI_CHECKMON_AREA = 32; //Æ¯Á¤ Áö¿ª¿¡ ¸÷ÀÌ ÀÖ´ÂÁö
const QI_CHECKHUM = 33;
const QI_CHECKBAGGAGE = 34; //»ç¿ëÀÚ¿¡°Ô ÁÙ ¼ö ÀÖ´ÂÁö?
// 6-11
const QI_CHECKNAMELIST = 35;
const QI_CHECKANDDELETENAMELIST = 36;
const QI_CHECKANDDELETEIDLIST = 37;
// *dq
const QI_IFGETDAILYQUEST = 40; //¿À´Ã Äù½ºÆ®¸¦ ¹Þ¾Ò´ÂÁö °Ë»ç, À¯È¿±â°£ °Ë»ç Æ÷ÇÔ
const QI_CHECKDAILYQUEST = 41; //Æ¯Á¤ ¹øÈ£ÀÇ Äù½ºÆ®¸¦ ¼öÇàÁßÀÎÁö °Ë»ç, À¯È¿±â°£ °Ë»ç Æ÷ÇÔ
const QI_RANDOMEX = 42; //ÆÄ¶ó¸ÞÅ¸  5 100   5%ÀÓ...

const QI_CHECKMON_NORECALLMOB_MAP = 43; //ÇöÀç ¸Ê¿¡ ÀÖ´Â ¸÷ ¼ö(¼ÒÈ¯¸÷ Á¦¿Ü)
const QI_CHECKBAGREMAIN = 44; //À¯Àú °¡¹æÀÇ °ø°£ÀÌ N°³ ³²¾Æ ÀÖ´ÂÁö

const QI_CHECKGRADEITEM = 50;

const QI_EQUALVAR = 51; //EQUALV D1 P1  //D1ÀÌ P1°ú °°ÀºÁö

const QI_EQUAL = 135; //EQUAL P1 10   //P1ÀÌ 10ÀÎÁö
const QI_LARGE = 136; //LARGE P1 10   //P1ÀÌ 10º¸´Ù Å«Áö
const QI_SMALL = 137; //SMALL P1 10   //P1ÀÌ 10º¸´Ù ÀÛÀºÁö °Ë»ç

const QI_ISGROUPOWNER = 138; //±×·ì ¼ÒÀ¯ÁÖÀÎÁö ¾Æ´ÑÁö °Ë»ç
const QI_ISEXPUSER = 139; //Ã¼ÇèÆÇ »ç¿ëÀÚÀÎÁö °Ë»ç
const QI_CHECKLOVERFLAG = 140; //¿¬ÀÎÀÇ ÇÃ·¡±×°¡ TRUEÀÎÁö °Ë»ç(¿¬ÀÎÁ¤º¸¸¦ Ã£À» ¼ö ¾øÀ¸¸é FALSE ¸®ÅÏ)
const QI_CHECKLOVERRANGE = 141; //¿¬ÀÎÀÌ ÀÏÁ¤ ¹üÀ§ ¾È¿¡ ÀÖ´ÂÁö
const QI_CHECKLOVERDAY = 142; //¿¬ÀÎ°úÀÇ ±³Á¦ÀÏÀÌ ÀÏÁ¤ÀÏ ÀÌ»ó µÇ´ÂÁö
// ¸í¼ºÄ¡
const QI_CHECKFAMEGRADE = 143; //¸í¼º µî±ÞÀÌ N ÀÌ»ó µÇ´ÂÁö Ã¼Å©
const QI_CHECKFAMEPOINT = 144; //¸í¼º FameCur Æ÷ÀÎÆ®°¡ N ÀÌ»ó µÇ´ÂÁö Ã¼Å©
const QI_CHECKFAMEBASEPOINT = 145; //¸í¼º FameBase Æ÷ÀÎÆ®°¡ N ÀÌ»ó µÇ´ÂÁö Ã¼Å©
// Àå¿ø±âºÎ±Ý
const QI_CHECKDONATION = 146; // ÇöÀç ±âºÎ±Ý ÀÜ¾× Ã¼Å©
const QI_ISGUILDMASTER = 147; // GuildmasterÀÎÁö Ã¼Å©
const QI_CHECKWEAPONBADLUCK = 148; //¹«±âÀÇ ÀúÁÖ Ã¼Å©
const QI_CHECKPREMIUMGRADE = 149; // ÇÁ¸®¹Ì¾ö µî±Þ Ã¼Å©
const QI_CHECKCHILDMOB = 150; // ¼ÒÈ¯ÁßÀÎ ¸ó½ºÅÍ ÀÌ¸§À¸·Î Ã¼Å©(CHECKRECALLMOB)

const QI_CHECKGROUPJOBBALANCE = 151; // ±×·ì¿¡ Àü»ç, ¼ú»ç, µµ»ç ¼ö°¡ °°ÀºÁö Ã¼Å©
const QI_CHECKRANGEONELOVER = 152; // ¹üÀ§³»¿¡ ¿¬ÀÎÀÎ »ç¶÷ÀÌ ÀÖ´ÂÁö Ã¼Å©

const QI_EVENTCHECK = 153; // ComeBack2005 ÀÌº¥Æ® Ã¼Å©
const QI_CHECKITEMWVALUE = 154; //Âø¿ëÁßÀÎ °íÅë ¾ÆÀÌÅÛ ±â¼öÄ¡ Ã¼Å©

// Action

const QA_SET = 1; //101ÀÌ»ó
const QA_TAKE = 2; //¾ÆÀÌÅÛÀ» ¹Þ´Ù
const QA_GIVE = 3;
const QA_TAKEW = 4; //Âø¿ëÇÏ°í ÀÖ´Â ¾ÆÀÌÅÛÀ» ¹Þ´Ù
const QA_CLOSE = 5; //´ëÈ­Ã¢À» ´ÝÀ½
const QA_RESET = 6; //
const QA_OPENUNIT = 7;
const QA_SETUNIT = 8; //À¯´Ö¼Â  1..100
const QA_RESETUNIT = 9; //À¯´Ö¸®¼Â   1..100
const QA_BREAK = 10;
const QA_TIMERECALL = 11; // ÁöÁ¤µÈ ½Ã°£ÀÌ Áö³ª¸é ÇöÀç Àå¼Ò·Î ¼ÒÈ¯ µÈ´Ù.
const QA_PARAM1 = 12;
const QA_PARAM2 = 13;
const QA_PARAM3 = 14;
const QA_PARAM4 = 15;
const QA_MAPMOVE = 20;
const QA_MAPRANDOM = 21;
const QA_TAKECHECKITEM = 22; //CHECKÇ×¸ñ¿¡¼­ °Ë»çµÈ ¾ÆÀÌÅÛÀ» ¹Þ´Â´Ù.
const QA_MONGEN = 23; //¸ó½ºÅÍ¸¦ Á¨½ÃÅ´
const QA_MONCLEAR = 24; //¸ó½ºÅÍ¸¦ ¸ðµÎ Á¦°Å ½ÃÅ²´Ù
const QA_MOV = 25;
const QA_INC = 26;
const QA_DEC = 27;
const QA_SUM = 28; //SUM P1 P2 //P9 = P1 + P2
const QA_BREAKTIMERECALL = 29;
const QA_TIMERECALLGROUP = 30; // ÁöÁ¤µÈ ½Ã°£ÀÌ Áö³ª¸é ±×·ì ÀüÃ¼°¡ ÇöÀç Àå¼Ò·Î ¼ÒÈ¯ µÈ´Ù.
const QA_CLOSENOINVEN = 31; //´ëÈ­Ã¢À» ´ÝÀ½(ÀÎº¥Ã¢Àº °Çµå¸®Áö ¾ÊÀ½)

const QA_MOVRANDOM = 50; //MOVR
const QA_EXCHANGEMAP = 51; //EXCHANGEMAP R001  //R001¿¡ ÀÖ´Â ÇÑ »ç¶÷°ú ÀÚ¸®¸¦ ¹Ù²Û´Ù.
const QA_RECALLMAP = 52; //RECALLMAP R001  //R001¿¡ ÀÖ´Â »ç¶÷µéÀ» ¸ðµÎ ¼ÒÈ¯ ÇÑ´Ù.
const QA_ADDBATCH = 53;
const QA_BATCHDELAY = 54;
const QA_BATCHMOVE = 55;
const QA_PLAYDICE = 56; //PLAYDICE 2 @diceresult //2°³ÀÇ ÁÖ»çÀ§¸¦ ±¼¸°´Ù. ±×ÈÄ @diceresult ¼¼¼ÇÀ¸·Î °£´Ù
// 6-11
const QA_ADDNAMELIST = 57;
const QA_DELETENAMELIST = 58;
const QA_PLAYROCK = 59; //PLAYDICE 2 @diceresult //2°³ÀÇ ÁÖ»çÀ§¸¦ ±¼¸°´Ù. ±×ÈÄ @diceresult ¼¼¼ÇÀ¸·Î °£´Ù
// *dq
const QA_RANDOMSETDAILYQUEST = 60; //ÆÄ¶ó¸ÞÅÍ,  ÃÖ¼Ò, ÃÖ´ë  ¿¹) 401 450  401¿¡¼­ 450¹ø±îÁö ·£´ýÀ¸·Î ¼³Á¤
const QA_SETDAILYQUEST = 61;

const QA_GIVEEXP = 63; // °æÇèÄ¡ ÁÖ±â(ÀÌº¥Æ® Á¾·áÈÄ ±â´É »èÁ¦)

const QA_TAKEGRADEITEM = 70;

const QA_GOTOQUEST = 100;
const QA_ENDQUEST = 101;
const QA_GOTO = 102;
const QA_SOUND = 103;
const QA_CHANGEGENDER = 104;
const QA_KICK = 105;
const QA_MOVEALLMAP = 106; // ÇöÀç ¸Ê À¯ÀúµéÀ» ¸ðµÎ Æ¯Á¤ ¸ÊÀ¸·Î ÀÌµ¿½ÃÅ´.
const QA_MOVEALLMAPGROUP = 107; // ±×·ì ¸â¹öµé Áß¿¡ ÇöÀç ¸Ê¿¡ ÀÖ´Â ¸â¹öµé¸¸ Æ¯Á¤ ¸ÊÀ¸·Î ÀÌµ¿½ÃÅ´.
const QA_RECALLMAPGROUP = 108; // ±×·ì ¸â¹öµé Áß¿¡ Æ¯Á¤ ¸Ê¿¡ ÀÖ´Â ¸â¹öµé¸¸ ÇöÀç ¸ÊÀ¸·Î ÀÌµ¿½ÃÅ´.
const QA_WEAPONUPGRADE = 109; // µé°í ÀÖ´Â ¹«±â¿¡ ¿É¼ÇÀ» ºÙÀÎ´Ù.
const QA_SETALLINMAP = 110; // ÇöÀç ¸Ê¿¡ ÀÖ´Â ¸ðµç À¯ÀúµéÀÇ ÇÃ·¡±×¸¦ SETÇÑ´Ù.
const QA_INCPKPOINT = 111; // PK Point¸¦ Áõ°¡½ÃÅ²´Ù.
const QA_DECPKPOINT = 112; // PK Point¸¦ °¨¼Ò½ÃÅ²´Ù.
// ¿¬ÀÎ
const QA_MOVETOLOVER = 113; // ¿¬ÀÎ¾ÕÀ¸·Î ÀÌµ¿ÇÑ´Ù.
const QA_BREAKLOVER = 114; // ¿¬ÀÎ°ü°è¸¦ ÀÏ¹æÀûÀ¸·Î ÇØÁ¦½ÃÅ²´Ù.
const QA_SOUNDALL = 115; // ÁÖº¯»ç¶÷¿¡°Ô »ç¿îµå¸¦ µé·ÁÁÜ
// ¸í¼ºÄ¡
const QA_USEFAMEPOINT = 116; // ÀÚ½ÅÀÇ ¸í¼ºÄ¡ »ç¿ë
const QA_DECWEAPONBADLUCK = 117; // ÀúÁÖ°¡ ºÙÀº ¹«±âÀÇ ÀúÁÖ¸¦ 1 °¨¼Ò ½ÃÅ²´Ù.
// Àå¿ø±âºÎ±Ý
const QA_DECDONATION = 118; // ±âºÎ±Ý ÀÜ¾×À» °¨¼Ò ½ÃÅ²´Ù.
const QA_SHOWEFFECT = 119; // Àå¿øÀÌÆåÆ®¸¦ º¸¿©ÁØ´Ù.
const QA_MONGENAROUND = 120; // Ä³¸¯ÀÇ ÁÖÀ§¿¡ ¸ó½ºÅÍ¸¦ Á¨ ½ÃÅ²´Ù.
const QA_RECALLMOB = 121; // ºÎÇÏ ¸ó½ºÅÍ ¼ÒÈ¯

const QA_SETLOVERFLAG = 122; //¿¬ÀÎÀÇ ÇÃ·¡±×¸¦ SETÇÑ´Ù.
const QA_GUILDSECESSION = 123; //¹®ÆÄÅ»Åð
const QA_GIVETOLOVER = 124; //¿¬ÀÎ¿¡°Ô ¾ÆÀÌÅÛ ÁÖ±â
const QA_INCMEMORIALCOUNT = 125; //NPCº° Ä«¿îÆ® Áõ°¡
const QA_DECMEMORIALCOUNT = 126; //NPCº° Ä«¿îÆ® °¨¼Ò
const QA_SAVEMEMORIALCOUNT = 127; //NPCº° Ä«¿îÆ® ÆÄÀÏ ÀúÀå

const QA_INSTANTPOWERUP = 128; //¼ø°£ ´É·ÂÄ¡ »ó½Â
const QA_INSTANTEXPDOUBLE = 129; //¼ø°£ °æÇèÄ¡ 2¹è
const QA_HEALING = 130; //Èú¸µ
const QA_UNIFYITEM = 131; //¾ÆÀÌÅÛÀ» ÇÕÄ£´Ù

const QA_MISSION = 132; //¹Ì¼Ç ¼³Á¤
const QA_MOBPLACE = 133; //¹Ì¼Ç¸÷ ¹èÄ¡

const VERSION_NUMBER = 20050501;
const VERSION_NUMBER_20030805 = 20030805;
const VERSION_NUMBER_20030715 = 20030715;
const VERSION_NUMBER_20030527 = 20030527;
const VERSION_NUMBER_20030403 = 20030403;
const VERSION_NUMBER_030328 = 20030328;
const VERSION_NUMBER_030317 = 20030317;
const VERSION_NUMBER_030211 = 20030211;
const VERSION_NUMBER_030122 = 20030122;
const VERSION_NUMBER_020819 = 20020819;
const VERSION_NUMBER_0522 = 20020522;
const VERSION_NUMBER_02_0403 = 20020403;
const VERSION_NUMBER_01_1006 = 20011006;
const VERSION_NUMBER_0925 = 20010925;
const VERSION_NUMBER_0704 = 20010704;
//const VERSION_NUMBER_0522 = 20010522;
const VERSION_NUMBER_0419 = 20010419;
const VERSION_NUMBER_0407 = 20010407;
const VERSION_NUMBER_0305 = 20010305;
const VERSION_NUMBER_0216 = 20010216;
const BUFFERSIZE = 10000;

// ¾ÆÀÌÅÛÀÇ º¯È­°ª Á¤ÀÇ
const EFFTYPE_TWOHAND_WEHIGHT_ADD = 1;
const EFFTYPE_EQUIP_WHEIGHT_ADD = 2;
const EFFTYPE_LUCK_ADD = 3;
const EFFTYPE_BAG_WHIGHT_ADD = 4;
const EFFTYPE_HP_MP_ADD = 5;
const EFFTYPE2_EVENT_GRADE = 6;

// Comand Result Defines... PDS:2003-03-31 ---------------------------------
const CR_SUCCESS = 0; // ¼º°ø
const CR_FAIL = 1; // ½ÇÆÐ
const CR_DONTFINDUSER = 2; // À¯Àú¸¦ Ã£À» ¼ö ¾øÀ½
const CR_DONTADD = 3; // Ãß°¡ÇÒ ¼ö ¾øÀ½
const CR_DONTDELETE = 4; // »èÁ¦ÇÒ ¼ö ¾øÀ½
const CR_DONTUPDATE = 5; // º¯°æÇÒ ¼ö ¾øÀ½
const CR_DONTACCESS = 6; // ½ÇÇà ºÒ°¡´É
const CR_LISTISMAX = 7; // ¸®½ºÆ®ÀÇ ÃÖ´ëÄ¡ÀÌ¹Ç·Î ºÒ°¡´É
const CR_LISTISMIN = 8; // ¸®½ºÆ®ÀÇ ÃÖ¼ÒÄ¡ÀÌ¹Ç·Î ºÒ°¡´É
const CR_DBWAIT = 9; // DB¿¡¼­ ±â´Ù¸®°í ÀÖ´ÂÁß

// Á¢¼Ó»óÅÂ  PDS:2003-03-31 ------------------------------------------------
const CONNSTATE_UNKNOWN = 0; // ¾Ë¼ö ¾øÀ½
const CONNSTATE_DISCONNECT = 1; // ºñÁ¢¼Ó »óÅÂ
const CONNSTATE_NOUSE1 = 2; // »ç¿ë¾ÈÇÔ
const CONNSTATE_NOUSE2 = 3; // »ç¿ë¾ÈÇÔ
const CONNSTATE_CONNECT_0 = 4; // 0¹ø¼­¹ö¿¡ Á¢¼ÓÇÔ
const CONNSTATE_CONNECT_1 = 5; // 1¹ø¼­¹ö¿¡ Á¢¼ÓÇÔ
const CONNSTATE_CONNECT_2 = 6; // 2¹ø¼­¹ö¿¡ Á¢¼ÓÇÔ
const CONNSTATE_CONNECT_3 = 7; // 3¹ø¼­¹ö¿¡ Á¢¼ÓÇÔ : ¿¹ºñ·Î¸¸µë

// °ü°èºÐ·ù  2003/04/15 Ä£±¸, ÂÊÁö
const RT_FRIENDS = 1; // Ä£±¸
const RT_LOVERS = 2; // ¿¬ÀÎ
const RT_MASTER = 3; // »çºÎ
const RT_DISCIPLE = 4; // Á¦ÀÚ
const RT_BLACKLIST = 8; // ¾Ç¿¬

// ÂÊÁö»óÅÂ  PDS:2003-03-31 ------------------------------------------------
const TAGSTATE_NOTREAD = 0; // ÀÐÁö¾ÊÀ½
const TAGSTATE_READ = 1; // ÀÐÀ½
const TAGSTATE_DONTDELETE = 2; // »èÁ¦±ÝÁö
const TAGSTATE_DELETED = 3; // »èÁ¦µÊ

// ÂÊÁö»óÅÂ º¯°æ¿¡¼­ ¾²ÀÓ
const TAGSTATE_WANTDELETABLE = 3; // »èÁ¦°¡´ÉÇÏ°Ô º¯°æ

// Relationship Request Sequences...
const RsReq_None = 0; // ±âº»»óÅÂ
const RsReq_WantToJoinOther = 1; // ´©±¸¿¡°Ô Âü°¡½ÅÃ»À» ÇÔ
const RsReq_WaitAnser = 2; // ÀÀ´äÀ» ±â´Ù¸²
const RsReq_WhoWantJoin = 3; // ´©±º°¡ Âü°¡¸¦ ¿øÇÔ
const RsReq_AloowJoin = 4; // Âü°¡¸¦ Çã¶ôÇÔ
const RsReq_DenyJoin = 5; // Âü°¡¸¦ °ÅÀýÇÔ
const RsReq_Cancel = 6; // Ãë¼Ò

const RaReq_CancelTime = 30 * 1000; // ÀÚµ¿ Ãë¼Ò ½Ã°£ 30ÃÊ msec
const MAX_WAITTIME = 60 * 1000; // ÃÖ´ë ±â´Ù¸®´Â ½Ã°£
// Relationship State Define...
const RsState_None = 0; // ±âº»»óÅÂ
const RsState_Lover = 10; // ¿¬ÀÎ
const RsState_LoverEnd = 11; // ¿¬ÀÎÅ»Åð
const RsState_Married = 20; // °áÈ¥
const RsState_MarriedEnd = 21; // °áÈ¥Å»Åð
const RsState_Master = 30; // »çºÎ
const RsState_MasterEnd = 31; // »çºÎÅ»Åð
const RsState_Pupil = 40; // Á¦ÀÚ
const RsState_PupilEnd = 41; // Á¦ÀÚÅ»Åð
const RsState_TempPupil = 50; // ÀÓ½ÃÁ¦ÀÚ
const RsState_TempPupilEnd = 51; // ÀÓ½ÃÁ¦ÀÚÅ»Åð

// RelationShip Error Code...
const RsError_SuccessJoin = 1; // Âü°¡¿¡ ¼º°øÇÏ¿´´Ù ( Âü°¡ÇÑ»ç¶÷ÂÊ)
const RsError_SuccessJoined = 2; // Âü°¡¿¡ ¼º°øµÇ¾îÁ³´Ù ( Âü°¡µÈ »ç¶÷ÂÊ)
const RsError_DontJoin = 3; // Âü°¡ÇÒ¼ö ¾ø´Ù
const RsError_DontLeave = 4; // ¶°³¯¼ö ¾ø´Ù.
const RsError_RejectMe = 5; // °ÅºÎ»óÅÂÀÌ´Ù
const RsError_RejectOther = 6; // °ÅºÎ»óÅÂÀÌ´Ù
const RsError_LessLevelMe = 7; // ³ªÀÇ·¹º§ÀÌ ³·´Ù
const RsError_LessLevelOther = 8; // »ó´ë¹æÀÇ·¹º§ÀÌ ³·´Ù
const RsError_EqualSex = 9; // ¼ºº°ÀÌ °°´Ù
const RsError_FullUser = 10; // Âü¿©ÀÎ¿øÀÌ °¡µæÃ¡´Ù
const RsError_CancelJoin = 11; // Âü°¡Ãë¼Ò
const RsError_DenyJoin = 12; // Âü°¡¸¦ °ÅÀýÇÔ
const RsError_DontDelete = 13; // Å»Åð½ÃÅ³¼ö ¾ø´Ù.
const RsError_SuccessDelete = 14; // Å»Åð½ÃÄ×À½
const RsError_NotRelationShip = 15; // ±³Á¦»óÅÂ°¡ ¾Æ´Ï´Ù.

// °ãÄ¡±â
const MAX_OVERLAPITEM = 1000;

// À§Å¹»óÁ¡ ÆÇ¸ÅÁ¾·ù
// °³º°¾ÆÀÌÅÛ·ù
const USERMARKET_TYPE_ALL = 0; // ¸ðµÎ
const USERMARKET_TYPE_WEAPON = 1; // ¹«±â
const USERMARKET_TYPE_NECKLACE = 2; // ¸ñ°ÉÀÌ
const USERMARKET_TYPE_RING = 3; // ¹ÝÁö
const USERMARKET_TYPE_BRACELET = 4; // ÆÈÂî,Àå°©
const USERMARKET_TYPE_CHARM = 5; // ¼öÈ£¼®
const USERMARKET_TYPE_HELMET = 6; // Åõ±¸
const USERMARKET_TYPE_BELT = 7; // Çã¸®¶ì
const USERMARKET_TYPE_SHOES = 8; // ½Å¹ß
const USERMARKET_TYPE_ARMOR = 9; // °©¿Ê
const USERMARKET_TYPE_DRINK = 10; // ½Ã¾à
const USERMARKET_TYPE_JEWEL = 11; // º¸¿Á,½ÅÁÖ
const USERMARKET_TYPE_BOOK = 12; // Ã¥
const USERMARKET_TYPE_MINERAL = 13; // ±¤¼®
const USERMARKET_TYPE_QUEST = 14; // Äù½ºÆ®¾ÆÀÌÅÛ
const USERMARKET_TYPE_ETC = 15; // ±âÅ¸
const USERMARKET_TYPE_ITEMNAME = 16; // ¾ÆÀÌÅÛÀÌ¸§
// ¼ÂÆ®·ù
const USERMARKET_TYPE_SET = 100; // ¼ÂÆ® ¾ÆÀÌÅÛ
// À¯Àú·ù
const USERMARKET_TYPE_MINE = 200; // ÀÚ½ÅÀÌÆÇ¹°°Ç
const USERMARKET_TYPE_OTHER = 300; // ´Ù¸¥»ç¶÷ÀÌ ÆÇ¹°°Ç

const USERMARKET_MODE_NULL = 0; // ÃÊ±â°ª
const USERMARKET_MODE_BUY = 1; // »ç´Â¸ðµå
const USERMARKET_MODE_INQUIRY = 2; // Á¶È¸¸ðµå
const USERMARKET_MODE_SELL = 3; // ÆÇ¸Å¸ðµå


const MARKET_CHECKTYPE_SELLOK = 1; //À§Å¹ Á¤»ó
const MARKET_CHECKTYPE_SELLFAIL = 2; //À§Å¹ ½ÇÆÐ
const MARKET_CHECKTYPE_BUYOK = 3; //±¸ÀÔ Á¤»ó
const MARKET_CHECKTYPE_BUYFAIL = 4; //±¸ÀÔ ½ÇÆÐ
const MARKET_CHECKTYPE_CANCELOK = 5; //Ãë¼Ò Á¤»ó
const MARKET_CHECKTYPE_CANCELFAIL = 6; //Ãë¼Ò ½ÇÆÐ
const MARKET_CHECKTYPE_GETPAYOK = 7; //µ· È¸¼ö Á¤»ó
const MARKET_CHECKTYPE_GETPAYFAIL = 8; //µ· È¸¼ö ½ÇÆÐ

const MARKET_DBSELLTYPE_SELL = 1; //ÆÇ¸ÅÁß
const MARKET_DBSELLTYPE_BUY = 2; //»òÀ½
const MARKET_DBSELLTYPE_CANCEL = 3; //Ãë¼Ò
const MARKET_DBSELLTYPE_GETPAY = 4; //±Ý¾×È¸¼ö
const MARKET_DBSELLTYPE_READYSELL = 11; //ÀÓ½Ã ÆÇ¸ÅÁß
const MARKET_DBSELLTYPE_READYBUY = 12; //ÀÓ½Ã »ç´ÂÁß
const MARKET_DBSELLTYPE_READYCANCEL = 13; //ÀÓ½Ã Ãë¼ÒÁß
const MARKET_DBSELLTYPE_READYGETPAY = 14; //ÀÓ½Ã È¸¼öÁß
const MARKET_DBSELLTYPE_DELETE = 20; //»èÁ¦

// À§Å¹»óÁ¡ ¸®ÅÏ°ª
const UMResult_Success = 0; // ¼º°ø
const UMResult_Fail = 1; // ½ÇÆÐ
const UMResult_ReadFail = 2; // ÀÐ±â ½ÇÆÐ
const UMResult_WriteFail = 3; // ÀúÀå ½ÇÆÐ
const UMResult_ReadyToSell = 4; // ÆÇ¸Å°¡´É
const UMResult_OverSellCount = 5; // ÆÇ¸Å ¾ÆÀÌÅÛ °³¼ö ÃÊ°ú
const UMResult_LessMoney = 6; // ±ÝÀüºÎÁ·
const UMResult_LessLevel = 7; // ·¹º§ºÎÁ·
const UMResult_MaxBagItemCount = 8; // °¡¹æ¿¡ ¾ÆÀÌÅÛ²ËÂü
const UMResult_NoItem = 9; // ¾ÆÀÌÅÛÀÌ ¾øÀ½
const UMResult_DontSell = 10; // ÆÇ¸ÅºÒ°¡
const UMResult_DontBuy = 11; // ±¸ÀÔºÒ°¡
const UMResult_DontGetMoney = 12; // ±Ý¾×È¸¼ö ºÒ°¡
const UMResult_MarketNotReady = 13; // À§Å¹½Ã½ºÅÛ ÀÚÃ¼°¡ ºÒ°¡´É
const UMResult_LessTrustMoney = 14; // À§Å¹±Ý¾×ÀÌ ºÎÁ· 1000 Àü º¸´Ù´Â Ä¿¾ßµÊ
const UMResult_MaxTrustMoney = 15; // À§Å¹±Ý¾×ÀÌ ³Ê¹« Å­
const UMResult_CancelFail = 16; // À§Å¹Ãë¼Ò ½ÇÆÐ
const UMResult_OverMoney = 17; // ¼ÒÀ¯±Ý¾× ÃÖ´ëÄ¡°¡ ³Ñ¾î°¨
const UMResult_SellOK = 18; // ÆÇ¸Å°¡ Àß‰çÀ½
const UMResult_BuyOK = 19; // ±¸ÀÔÀÌ Àß‰çÀ½
const UMResult_CancelOK = 20; // ÆÇ¸ÅÃë¼Ò°¡ Àß‰çÀ½
const UMResult_GetPayOK = 21; // ÆÇ¸Å±Ý È¸¼ö°¡ Àß‰çÀ½

// °¡°ÝÃÖ´ëÄ¡
const MAX_MARKETPRICE = 50000000; //5000¸¸Àü


struct MsgHeader //°ÔÀÌÆ®¿Í ¼­¹ö Åë½Å¿¡ »ç¿ë
{
    uint Code; //$aa55aa55;
    int SNumber; //socket number
    ushort UserGateIndex; //Gate¿¡¼­ÀÇ Index
    ushort Ident; //
    ushort UserListIndex; //¼­¹ö¿¡ UserList¿¡¼­ÀÇ Index
    ushort temp;
    int Length; //body binary ÀÇ ±æÀÌ
}

//Å¬¶óÀÌ¾ðÆ®¿¡¼­ »ç¿ë
struct ChrMsg
{
    int Ident;
    int X;
    int Y;
    int Dir;
    int Feature;
    int State;
    string Saying;
    int Sound;
}
alias ChrMsg* PChrMsg;

//¼­¹ö¿¡¼­ »ç¿ë
struct MessageInfo
{
    ushort Ident;
    ushort Param;
    int Param1;
    int Param2;
    int Param3;
    void* Sender;
    void* Target;
    uint DeliveryTime; //µµÂø ½Ã°£...
    char[] Description;
}

struct ShortMessage
{
    ushort Ident;
    ushort Msg;
}

struct MessageBodyW
{
    ushort Param1;
    ushort Param2;
    ushort Tag1;
    ushort Tag2;
}

struct MessageBodyWL
{
    int Param1;
    int Param2;
    int Tag1;
    int Tag2;
}

struct CharDesc // sm_walk ÀÇ ÀÌµ¿ Á¤º¸
{
    int Feature; // 4 = (9)
    int Status;
}

struct PowerClass
{
    ubyte Min;
    ubyte Ever;
    ubyte Max;
    ubyte dummy;
}

struct NakedAbility
{
    ushort DC;
    ushort MC;
    ushort SC;
    ushort AC;
    ushort MAC;
    ushort HP;
    ushort MP;
    ushort Hit;
    ushort Speed;
    ushort Reserved;
}

struct ChgAttr
{
    ubyte Attr; //º¯°æµÈ ¼Ó¼º ½Äº° 1:AC 2:MAC 3:DC 4:MC 5:SC
    ubyte Min; //DC,MC,SCÀÇ min/max  AC,MACÀÎ°æ¿ì MakeWord(min,max)°ªÀÓ
    ubyte Max;
}

struct StandardItem
{
    public char Name[20];
    public ubyte StdMode;
    public ubyte Shape;
    public ubyte Weight;
    public ubyte AniCount;
    public byte SpecialPower;
    
    public ubyte Attribute;
    
    public ushort Looks;
    public ushort DuraMax;
    public ushort AC;
    public ushort MAC;
    public ushort DC;
    public ushort MC;
    public ushort SC;
    public ubyte Need;
    public ubyte NeedLevel;
    public uint Price;
}

align(1) struct UserItem
{
    int MakeIndex; //¼­¹ö¿¡¼­ÀÇ ¾ÆÀÌÅÛ ÀÎµ¦½º(¸¸µé¾î Áú¶§ ÀÎµ¦½º ¸Å°ÜÁü, Áßº¹°¡´É)
    ushort Index; //Ç¥ÁØ¾ÆÀÌÅÛÀÇ ÀÎµ¦½º  0:¾øÀ½, 1ºÎÅÍ ½ÃÀÛÇÔ..
    ushort Dura;
    ushort DuraMax; //º¯°æµÈ ³»±¸¼º ÃÖ´ë°ª
    ubyte Desc[14];
    //0..7 ¾ÆÀÌÅÛ ¾÷±×·¹ÀÌµå »óÅÂ
    //10 0:¾÷±×·¹ÀÌµå¿Í »ó°ü ¾øÀ½
    //   1:ÆÄ±«·Â ¾÷±×·¹ÀÌµå ¾ÆÀÌ´íÆ¼ÆÄÀÌ ¾È µÇ¾úÀ½
    //   2:¸¶·Â ¾÷±×·¹ÀÌµå ¾ÆÀÌ´íÆ¼ÆÄÀÌ ¾È µÇ¾úÀ½
    //   3:µµ·Â ¾÷±×·¹ÀÌµå ¾ÆÀÌ´íÆ¼ÆÄÀÌ ¾È µÇ¾úÀ½
    //   5:°ø°Ý¼Óµµ ¾÷±×·¹ÀÌµå ¾ÆÀÌ´íÆ¼ÆÄÀÌ ¾È µÇ¾úÀ½
    //   9:½ÇÆÐ, Æ÷°³Áü
    ubyte ColorR;
    ubyte ColorG;
    ubyte ColorB;
    char Prefix[20];
}

struct BaseAbility
{
    ubyte Level;
    ushort HP; //health point
    ushort MP; //magic point
    uint Exp; //ÇöÀç °æÇèÄ¡
    int FameCur; //ÇöÀç ¸í¼ºÄ¡(2004/10/22)
    int FameBase; //´©Àû ¸í¼ºÄ¡(2004/10/22)
}

struct Ability
{
    public ubyte Level;
    
    public ushort AC; //armor class
    public ushort MAC; //magic armor class
    public ushort DC; //damage class  -> makeword(min/max)
    public ushort MC; //magic power class   -> makeword(min/max)
    public ushort SC; //sprite energy class    -> makeword(min/max)
    public ushort HP; //health point
    public ushort MP; //magic point
    public ushort MaxHP; //max health point
    public ushort MaxMP; //max magic point
    
    public ubyte ExpCount; //»ç¿ë¾ÈÇÔ
    public ubyte ExpMaxCount; //»ç¿ë¾ÈÇÔ
    public uint Exp; //ÇöÀç °æÇèÄ¡
    public uint MaxExp; //ÇöÀç ÃÖ´ë °æÇèÄ¡
    
    public ushort Weight; //ÇöÀç ¹«°Ô
    public ushort MaxWeight; //µé ¼ö ÀÖ´Â ÃÖ´ë ¹«°Ô
    public ubyte WearWeight;
    public ubyte MaxWearWeight; //°ËÀ» Á¦¿ÜÇÑ Âø¿ë °¡´ÉÇÑ ¾ÆÀÌÅÛÀÇ ¹«°Ô (ÃÊ°úÇÏ¸é ±²ÀåÈ÷ ´À¸®´Ù 2-3¹è´À¸²)
    public ubyte HandWeight;
    public ubyte MaxHandWeight; //µé ¼ö ÀÖ´Â °ËÀÇ ¹«°Ô (¹«°Ô¸¦ ÃÊ°úÇÏ¸é ±²ÀåÈ÷ ´À¸®°Ô °ø°ÝÇÑ´Ù 2-3¹è´À¸²)
    
    public int FameCur; //ÇöÀç ¸í¼ºÄ¡(2004/10/22)
    public int FameBase; //´©Àû ¸í¼ºÄ¡(2004/10/22)
}

struct AddAbility //¾ÆÀÌÅÛ Âø¿ëÀ¸·Î ´Ã¾î³ª´Â ´É·ÂÄ¡
{
    ushort HP;
    ushort MP;
    ushort HIT; // Á¤È®
    ushort SPEED; // ¹ÎÃ¸
    ushort AC;
    ushort MAC;
    ushort DC;
    ushort MC;
    ushort SC;
    ushort AntiPoison; //%  // Áßµ¶ÀúÇ×
    ushort PoisonRecover; //%
    ushort HealthRecover; //%
    ushort SpellRecover; //%
    ushort AntiMagic; //¸¶¹ý È¸ÇÇÀ² % // => ¸¶¹ýÀúÇ×
    ubyte Luck; //Çà¿î Æ÷ÀÎÆ®
    ubyte UnLuck; //ºÒÇà Æ÷ÀÎÆ®
    ubyte WeaponStrong;
    ubyte UndeadPower;
    byte HitSpeed;
    // added by sonmg
    ubyte Slowdown;
    ubyte Poison;
}


struct PricesInfo //°¡°Ý Á¤º¸
{
    ushort Index; //Ç¥ÁØ ¾ÆÀÌÅÛÀÇ ÀÎµ¦½º
    int SellPrice; //±âº» °¡°Ý, BuyPrice´Â SellPriceÀÇ Àý¹Ý
}

struct ClientGoods
{
    char Name[15];
    ubyte SubMenu;
    int Price;
    int Stock; //°³º°¾ÆÀÌÅÛÀÎ°æ¿ì, ItemÀÇ ServerIndex ÀÓ
    //ushort Dura;
    //ushort DuraMax;
    byte Grade; //»óÅÂ
}

struct ClientJangwon //Àå¿ø ¸®½ºÆ®
{
    int Num;
    char GuildName[21];
    char CaptaineName1[15];
    char CaptaineName2[15];
    int SellPrice;
    char SellState[11];
}

struct ClientGABoard //Àå¿ø °Ô½ÃÆÇ ¸®½ºÆ®
{
    char WrigteUser[15];
    char TitleMsg[41];
    int IndexType1;
    int IndexType2;
    int IndexType3;
    int IndexType4;
    int ReplyCount;
}

struct ClientGADecoration //Àå¿ø ²Ù¹Ì±â
{
    int Num;
    char Name[26];
    int Price;
    int ImgIndex;
    int CaseNum;
    //      Hint      : string[40];
}

struct ClientItem //Å¬¶óÀÌ¾ðÆ®¿¡¼­ ÇÊ¿äÇÑ Æ÷¸ä
{
    public StandardItem S;
    public int Serial;
    public ushort Dura;
    public ushort DuraMax;
}

struct UserStateInfo
{
    int Feature;
    char UserName[15];
    int NameColor;
    char GuildName[21]; //[14]; //¼öÁ¤(2004/12/22)
    char GuildRankName[15];
    ClientItem UseItems[13];
    bool bExistLover; //¿¬ÀÎ »óÅÂ(2004/10/27)
    char LoverName[15]; //¿¬ÀÎ ÀÌ¸§(2004/11/03)
    char FameName[21]; //¸í¼º È£Äª(2004/10/27)
}

struct DropItem //Å¬¶óÀÌ¾ðÆ®¿¡¼­ »ç¿ë
{
    int Id;
    ushort X;
    ushort Y;
    ushort Looks;
    uint FlashTime; //¸¶Áö¸·À¸·Î ¹ÝÂ¦°Å¸° ½Ã°£
    bool BoFlash;
    uint FlashStepTime;
    int FlashStep;
    char Name[26];
    bool BoDeco;
}

struct DefMagic
{
    ushort MagicId;
    char MagicName[15]; //Ä­ ´Ã¸±°Í 12->14(Å¬¶óÀÌ¾ðÆ®¿Í ÇÔ²² »ç¿ë)
    ubyte EffectType;
    ubyte Effect;
    ushort Spell;
    ushort MinPower;
    ubyte NeedLevel[4];
    int MaxTrain[4];
    ubyte MaxTrainLevel; //¼ö·Ã ·¹º§
    ubyte Job; //0: Àü»ç 1:¼ú»ç  2:µµ»ç   99:¸ðµÎ°¡´É
    int DelayTime; //ÇÑ¹æ ½ð´ÙÀ½¿¡ ´ÙÀ½ ¸¶¹ýÀ» ¾µ ¼ö ÀÖ´Âµ¥ °É¸®´Â ½Ã°£
    ubyte DefSpell;
    ubyte DefMinPower;
    ushort MaxPower;
    ubyte DefMaxPower;
    char Desc[16];
}

struct UserMagic
{
    DefMagic* pDef; //¹Ýµå½Ã nilÀÌ ¾Æ´Ï¾î¾ß ÇÑ´Ù.
    ushort MagicId; //Magic Index ÀúÀå. À¯´ÏÅ©ÇØ¾ßÇÏ¸ç, º¯µ¿µÇ¸é ¾ÈµÊ, Ç×»ó 0º¸´Ù Å©´Ù.
    ubyte Level;
    char Key; //»ç¿ëÀÚ°¡ ÁöÁ¤ÇÑ Å°
    int CurTrain; //ÇöÀç ¼ö·ÃÄ¡
}

struct ClientMagic
{
    char Key;
    ubyte Level;
    int CurTrain;
    DefMagic Def;
}

// 2003/04/15 Ä£±¸, ÂÊÁö
struct Friend
{
    char[] CharID;
    ubyte Status;
    char[] Memo;
}

struct Mail
{
    char[] Sender;
    char[] Date;
    char[] Mail;
    ubyte Status;
}

struct Relationship
{
    char[] CharID;
    ubyte Level;
    ubyte Sex;
    ubyte Status;
    char[] Date;
}

struct SkillInfo
{
    ushort SkillIndex;
    ushort Reserved;
    int CurTrain;
}

struct MapItem
{
    UserItem Item;
    char Name[26];
    ushort Looks;
    ubyte AniCount;
    ubyte Reserved;
    int Count;
    void* Ownership; //¹°°ÇÀ» ÁýÀ» ¼ö ÀÖ´Â »ç¶÷
    uint DropTime; //¹°°ÇÀ» Èê¸° ½Ã°£
    void* Droper; //¹°°ÇÀ» ¶³¾î¶ß¸° ÀÚ (»ç¶÷? ¸ó½ºÅÍ?)
}

//Àå¿ø²Ù¹Ì±â ¾ÆÀÌÅÛ(sonmg)
struct AgitDecoItem
{
    char Name[26];
    ushort Looks;
    char MapName[15];
    ushort X;
    ushort Y;
    char Maker[15];
    ushort Dura;
}

//map¿ë ¾ÆÀÌÅÛ
struct VisibleItemInfo
{
    ubyte Check;
    ushort X;
    ushort Y;
    int Id;
    char Name[26];
    ushort Looks;
}

struct VisibleActor
{
    ubyte Check;
    void* Cret;
}

struct GateInfo
{
    ubyte GateType;
    void* EnterEnvir; //TEnvirnoment;
    int EnterX;
    int EnterY;
}

//¸Ê¿¡ °ü·ÃµÈ ·¹ÄÚµå
struct AThing
{
    ubyte Shape;
    void* AObject;
    uint ATime;
}

struct MapInfo
{
    ubyte MoveAttr; //0: can move  1: can't move  2: can't move and cant't fly
    bool Door; //¹®ÀÌÀÖÀ½, OBJListÁß¿¡ ¹® ÀÖÀ½
    ubyte Area; //Áö¿ª ±¸ºÐ (¸¶À»,¼ö·ÃÀå,µîµî)
    ubyte Reserved; //¹Ì»ç¿ë
    AThing[] OBJList; // list of TAThing
}


struct UserEntryInfo // »ç¿ëÀÚ µî·ÏÁ¤º¸, logonÀü¿¡ ¾²ÀÓ
{
    char LoginId[11];
    char Password[11];
    char UserName[21]; //*
    char SSNo[15]; //* 721109-1476110
    char Phone[15]; //ÁýÀüÈ­ ¹øÈ£
    char Quiz[21]; //*
    char Answer[13]; //*
    char EMail[41];
}
struct UserEntryAddInfo
{
    char Quiz2[21]; //*
    char Answer2[13]; //*
    char Birthday[11]; //* 1972/11/09
    char MobilePhone[14]; //017-6227-1234
    char Memo1[21]; //*
    char Memo2[21]; //*
}

struct QueryChr
{
    char Name[21];
    ubyte Sex;
    ubyte Hair;
    ubyte Job;
    ubyte Level;
}

struct UserCharacterInfo // °¡»ó¼¼°è¿¡ µé¾î¿À±â Àü¿¡ »ç¿ëÀÚ¿¡°Ô Àü´ÞµÇ´Â
{
    char Name[21]; // ÄÉ·¢ÅÍ Á¤º¸
    ubyte Sex;
    ubyte Hair;
    ubyte Job; //0:Àü»ç 1: ¼ú»ç 2:µµ»ç
    ubyte Level;
    int Feature;
}

align(1) struct LoadHuman
{
    char UsrId[21];
    char ChrName[21];
    char UsrAddr[17];
    int CertifyCode;
}

struct MonsterInfo
{
    char Name[15];
    ubyte Race; //¼­¹öÀÇ AI ÇÁ·Î±×·¥
    ubyte RaceImg; //Å¬¶óÀÌ¾ðÆ® ÇÁ·¡ÀÓ ½Äº°
    ushort Appr; //ÀÌ¹ÌÁö ¹øÈ£
    ubyte Level;
    ubyte LifeAttrib;
    ubyte CoolEye; //´«ÀÇ ÁÁÀ½, 100% ÀÌ¸é Àº½ÅÀ» º½, 50%ÀÌ¸é Àº½ÅÀ» º¼ È®·üÀÌ 50%
    ushort Exp;
    ushort HP;
    ushort MP;
    ubyte AC;
    ubyte MAC;
    ubyte DC;
    ubyte MaxDC;
    ubyte MC;
    ubyte SC;
    ubyte Speed;
    ubyte Hit;
    ushort WalkSpeed;
    ushort WalkStep;
    ushort WalkWait;
    ushort AttackSpeed;
    
    // newly added by sonmg.
    ushort Tame;
    ushort AntiPush;
    ushort AntiUndead;
    ushort SizeRate;
    ushort AntiStop;
    
    //ItemList: TList;
}

struct ZenInfo
{
    char MapName[15];
    int X;
    int Y;
    char MonName[15];
    int MonRace; //
    int Area; //¹üÀ§ +area, -area rectangle
    int Count;
    uint MonZenTime; //¹Ð¸®¼¼ÄÁµå ´ÜÀ§
    uint StartTime;
    //Mons: TList;
    int SmallZenRate;
    // 2003/06/20 ÀÌº¥Æ®¿ë ¸÷ Ã³¸®
    int TX;
    int TY;
    int ZenShoutType;
    int ZenShoutMsg;
}

struct MonItemInfo
{
    int SelPoint;
    int MaxPoint;
    char ItemName[15];
    int Count; //°¹¼ö,
}

struct MarketProduct
{
    char GoodsName[15];
    int Count;
    int ZenHour; //hour
    uint ZenTime; //ÃÖ±Ù¿¡ Á¨½ÃÅ² ½Ã°£
}

//QuestDiary¿ë
struct QDDinfo
{
    int Index;
    char[] Title;
    //SList: TStringList;
}

// À§Å¹ÆÇ¸Å¿ë ¾ÆÀÌÅÛ --------------------------------------------------------
struct MarketItem
{
    ClientItem Item; // º¯°æµÈ ´É·ÂÄ¡´Â ¿©±â¿¡ Àû¿ëµÊ.
    int UpgCount; // Ãß°¡·Î ¾÷±×·¹ÀÌµå µÈ °³¼ö
    int Index; // ÆÇ¸Å¹øÈ£
    int SellPrice; // ÆÇ¸Å °¡°Ý
    char SellWho[21]; // ÆÇ¸ÅÀÚ
    SysTime SellDate; // ÆÇ¸Å³¯Â¥(0312311210 = 2003-12-31 12:10 )
    ushort SellState; // 1 = ÆÇ¸ÅÁß , 2 = ÆÇ¸Å¿Ï·á
}

// À§Å¹ÆÇ¸Å ÀÐ±â¿ë ----------------------------------------------------------
struct MarketLoad
{
    UserItem Item; // DB ÀúÀå¿ë
    int Index; // DB ÀÎµ¦½º
    int MarketType; // ºÐ¸®µÈ ¾ÆÀÌÅÛ Á¾·ù
    int SetType; // ¼ÂÆ® ¾ÆÀÌÅÛ Á¾·ù
    int SellCount;
    int SellPrice; // ÆÇ¸Å °¡°Ý
    char ItemName[31]; // ¾ÆÀÌÅÛÀÌ¸§
    char MarketName[31]; // ÆÇ¸ÅÀÚ¸í
    char SellWho[21]; // ÆÇ¸ÅÀÚ
    //SellDate: TDateTime; // ÆÇ¸Å³¯Â¥(0312311210 = 2003-12-31 12:10 )
    ushort SellState; // 1 = ÆÇ¸ÅÁß , 2 = ÆÇ¸Å¿Ï·á
    int IsOK; // °á°ú°ª
}

//¾ÆÀÌÅÛ °Ë»ö¿ë ------------------------------------------------------------
struct SearchSellItem
{
    char MarketName[26]; // ¼­¹öÀÌ¸§_NPC  ÀÌ¸§ÀÌ »ç¿ëµÊ
    char Who[26]; // ¾ÆÀÌÅÛ ÆÇ¸ÅÀÚ °Ë»ö½Ã »ç¿ë ,
    char ItemName[26]; // ¾ÆÀÌÅÛ ÀÌ¸§ °Ë»ö½Ã »ç¿ë
    int MakeIndex; // ¾ÆÀÌÅÛÀÇ À¯´ÏÅ© ¹øÈ£
    int ItemType; // ¾ÆÀÌÅ× Á¾·ù °Ë»ö½Ã »ç¿ë
    int ItemSet; // ¾ÆÀÌÅÛ ¼ÂÆ® Á¶È¸½Ã »ç¿ë
    int SellIndex; // ÆÇ¸Å ÀÎµ¦½º ¾ÆÀÌÅÛ »ì¶§ , Ãë¼Ò , ±Ý¾×È¸¼öµî¿¡ »ç¿ë
    int CheckType; // DB ÀÇ Ã¼Å©Å¸ÀÔ
    int IsOK; // °á°ú°ª
    int UserMode; // 1= ¾ÆÀÌÅÛ »ç±â  , 2= ÀÚ½ÅÀÇ ¾ÆÀÌÅÛ °Ë»ö
    //pList: TList; // À§Å¹¾ÆÀÌÅÛÀÇ ¸®½ºÆ®
}

//À§Å¹°Ë»ç¿ë....------------------------------------------------------------
struct MaketReqInfo
{
    char UserName[30];
    char MarketName[30];
    char SearchWho[30];
    char SearchItem[30];
    int ItemType;
    int ItemSet;
    int UserMode;
}

//Àå¿ø°Ô½ÃÆÇ ¸®½ºÆ® °Ë»ö¿ë....------------------------------------------------------------
struct SearchGaBoardList
{
    int AgitNum; // ¹Ì»ç¿ë
    char GuildName[30];
    int OrgNum; // ¹Ì»ç¿ë
    int SrcNum1; // ¹Ì»ç¿ë
    int SrcNum2; // ¹Ì»ç¿ë
    int SrcNum3; // ¹Ì»ç¿ë
    int Kind;
    char UserName[20]; // ¹Ì»ç¿ë
    //ArticleList: TList; // °Ô½ÃÆÇ ¸®½ºÆ®
}

//Àå¿ø°Ô½ÃÆÇ ±Û³»¿ë....------------------------------------------------------------
struct GaBoardArticleLoad
{
    int AgitNum;
    char GuildName[30];
    int OrgNum;
    int SrcNum1;
    int SrcNum2;
    int SrcNum3;
    int Kind;
    char UserName[20];
    char Content[500];
}



/+function RACEfeature(feature: Longint): byte;
begin
  Result := LOBYTE(LOWORD(feature));
end;

function WEAPONfeature(feature: Longint): byte;
begin
  Result := HIBYTE(LOWORD(feature));
end;

function HAIRfeature(feature: Longint): byte;
begin
  Result := LOBYTE(HIWORD(feature));
end;

function DRESSfeature(feature: Longint): byte;
begin
  Result := HIBYTE(HIWORD(feature));
end;

function APPRfeature(feature: Longint): word;
begin
  Result := HIWORD(feature);
end;

function MakeFeature(race, dress, weapon, face: byte): Longint;
begin
  Result := MakeLong(MakeWord(race, weapon), MakeWord(face, dress));
end;

function MakeFeatureAp(race, state: byte; appear: word): Longint;
begin
  Result := MakeLong(MakeWord(race, state), appear);
end;

function UpInt(const r: Real): integer;
begin
  //Result := Ceil(r);
  if r > Int(r) then Result := Trunc(r) + 1 else Result := Trunc(r);
end;+/